- Set up environment variables in
nuxt.config.js
under theenv
constant. (e.g. in ~/.bashrc, addexport API_URL="https://yourapi.com"
)
By default, this app is served with SSR. If you want to run this app as an SPA, you can change the mode (set in nuxt.config.js
) to 'spa' in the env. Then, when you run nuxt build
, a dist
folder will be created that can be migrated to a static host such as s3 (with cloudfront). Be sure to redirect all 404 errors to /index.html
in your server or cloud platform. Otherwise, routes other than /index.html
will return with a 404 error.
# install dependencies
$ npm install # Or yarn install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm start
For detailed explanation on how Nuxt works, checkout the Nuxt.js docs
- Current design by Duo
- v1 design by Chris Hitchcott