/next.js-boilerplate

Configuration for React + NextJs SSR with Express, i18n, Jest, SASS and Robots.txt + Sitemap.xml

Primary LanguageJavaScript

NextJs Config

config set by Ivan Ruiz.

TODO

  • Express
  • Url prettifier
  • SASS
  • Page specific CSS Styling
  • Prop-Types
  • Normalize.css
  • Next/Link active routes
  • Translations (i18n)
  • Sitemap.xml
  • Robots.txt
  • Jest Testing :
    • ES6
    • Supertest
    • React Enzyme
    • Enzyme to Json
    • Allow css, sass and scss imports
    • Transform file imports

Dependencies

To install dependencies run the following command:

Yarn:

yarn install

npm:

npm i // npm install

Starting server

Production

To start the production server:

Yarn:

yarn next:build
yarn start
npm run next:build
npm start

Development

There's a bug with nodemon + next, so we cant watch filest at "pages" directory, but its still better then nothing:

Yarn:

yarn dev

npm:

npm run dev

Testing

To start testing with Jest:

Yarn:

yarn test

npm:

npm run test