/next-express-emotion

Easy way to setup NextJS 9.4.0, React 16.11.0+, Express 4.17.1+, and Emotion 11+ locally.

Primary LanguageJavaScript

next-express-emotion

My boilerplate for creating a web application with a server.

Use this Emotion 11 example if you do not want a server.

Primary dependencies

Jimmy, why on earth would I use this?

  • You love server side rendering.
  • You don't need a database, see next-postgres if you do.
  • You like my front-end code and want to see my technical choices in one place.
  • You need meta tag recommendations for SEO.
  • You are comfortable with the starting 16 dependencies for a full client and server application. I rarely need anything else.
  • You need something you can extend because you write your own custom components and styles.

Okay, why CSS-in-JS?

  • We use css as a prop so it still feels like writing Vanilla CSS.
  • Auto-prefixing support, unless it is a quirk like hiding scrollbars on Firefox.
  • O(1) class name lookup like Tachyons, except each class gets an unique string generated and you don't have to memorize their names.

Why not [insert another option]?

If you are sincere and researched, I am happy to have a conversation. Please file an issue.

Setup

Make sure NodeJS 10+ is installed. Then run:

npm install
npm run dev

Now view localhost:8080 in your browser.

Deploy To Production

I use these services for all of my work:

Then on the service you can run:

npm run build
npm run start

Questions?

Twitter: @wwwjim.