Out of the box, this example includes
- Universal es2015 JS
- React...
- Client Side Routing
- Server Side Rendering
- Code Splitting
- Tree Shaking
- Hot Module Replacement
- A REST API
- Live API Reload
- Configurable Webpack endpoints
- Configurable Babel
with no boilerplate, no log spam, human readable errors all around, while being production ready!
All thanks to Next.js and Backpack!
git clone https://github.com/rlindskog/next-backpack/
cd next-backpack
npm install
npm run dev
npm run build
npm start
According to a FAQ in the Next.js Docs
How do I fetch data?
It’s up to you. getInitialProps is an async function (or a regular function that returns a Promise). It can retrieve data from anywhere.
and according to a the Backpack docs
You should use create-react-app or Next.js for your frontend and then build your backend with Backpack.
The reason this combo is so great is because Next acts as the Page server and Backpack acts as an API server. They both follow extremely similar ideologies.