/next-backpack

A display of the awesomeness that occurs when you combine Next with Backpack.

Primary LanguageJavaScript

screen shot 2016-10-25 at 2 37 27 pm screen shot 2016-10-25 at 2 37 27 pm

Out of the box, this example includes

  1. Universal es2015 JS
  2. React...
  3. Client Side Routing
  4. Server Side Rendering
  5. Code Splitting
  6. Tree Shaking
  7. Hot Module Replacement
  8. A REST API
  9. Live API Reload
  10. Configurable Webpack endpoints
  11. Configurable Babel

with no boilerplate, no log spam, human readable errors all around, while being production ready!

All thanks to Next.js and Backpack!

Setup

git clone https://github.com/rlindskog/next-backpack/
cd next-backpack
npm install

Run in Development##

npm run dev

Build/Run for production##

npm run build
npm start

Why not just Next.js?

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.

Check out Next.js and Backpack docs to learn more.