Skip to content

nekdolan/express-template-hot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nuxt.js with Express Hot

ExpressJS + Nuxt.js = ⚡ Based on Express-template

This is Nuxt.js with Express template using hot reloading for nuxt rather than the live reload of backpack. To make this possible in development mode a http proxy pointing to the the api server is added to nuxt as a server middleware. During development nuxt and the api server has to be run as separate servers.

Installation

This is a project template for vue-cli.

vue init nekdolan/express-template-hot <project-name>
cd <project-name> # move to your project
npm install # or yarn install

Make sure to use a version of vue-cli >= 2.1 (vue -V).

Commands

Command Description
npm run nuxt Runs nuxt in development mode on port 3000
npm run dev Runs the express api server on port 8008

Everything else should work the same way as nuxt-express

ExpressJS Changes

  • There is a server directory with the root of your express server.
  • The routes directory is called server/api.

Backpack

We use backpack to watch and build the application, so you can use the latest ES6 features (module syntax, async/await, etc.).

The module adds express into Nuxt's connect middleware stack using Nuxt's module system. The method will also handle hot reloading with out causing the nuxt build server to restart.

Examples

Documentation

Licenses

About

Starter template for Nuxt.js with Express.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 51.4%
  • Vue 43.4%
  • CSS 5.2%