Frontend frameworks generally have their own development tooling, including command line tools, hot reload, etc. Based on this assumption, here are some recommendations:
- In development: run 2 separate servers — one for Bocadillo, one for the frontend.
- In production, either:
- Serve the frontend build with Bocadillo. This may be enough for smaller-scale setups, and as shown in the react-example repo, this can be achieved by:
- (Recommended) Deploy Bocadillo and the frontend on two separate hosts. See also Deployment for general hints on deploying Bocadillo applications. For the frontend, please refer to your framework's instructions.
The following example repos show how to get a development setup ready for your Bocadillo and frontend apps. Feel free to check them out, fork them, and hack them away! 🚀
|React||react-example||Hello world example, with GraphQL setup.|
|Vue.js||vue-example||URL Shortener web app, with database setup.|
Missing your favorite framework? Discuss it with us by opening an issue . We'd be glad to setup and work together on additional official example repos.