diff --git a/template/.editorconfig b/.editorconfig similarity index 100% rename from template/.editorconfig rename to .editorconfig diff --git a/template/.eslintrc.js b/.eslintrc.js similarity index 100% rename from template/.eslintrc.js rename to .eslintrc.js diff --git a/template/.gitignore b/.gitignore similarity index 100% rename from template/.gitignore rename to .gitignore diff --git a/README.md b/README.md index 5b821a3..6ee0992 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,36 @@ > [ExpressJS](http://expressjs.com/) + [Nuxt.js](https://nuxtjs.org) = :zap: -Live Demo: [https://codesandbox.io/s/github/nuxt-community/express-template/tree/demo](https://codesandbox.io/s/github/nuxt-community/express-template/tree/demo) +Live Demo: [https://codesandbox.io/s/github/nuxt-community/express-template](https://codesandbox.io/s/github/nuxt-community/express-template) ## Installation -This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). +This is a template project, clone or fork the repo and start your project ```bash -vue init nuxt-community/express-template +git clone https://github.com/nuxt-community/express-template.git cd # move to your project -npm install # or yarn install +yarn install # or npm install ``` -> Make sure to use a version of vue-cli >= 2.1 (vue -V). +## Build Setup + +```bash +# install dependencies +$ yarn install + +# serve with hot reload at localhost:3000 +$ yarn dev + +# build for production and launch server +$ yarn build +$ yarn start + +# generate static project +$ yarn generate +``` + +For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org). ## ExpressJS Changes @@ -47,3 +64,5 @@ npm install # or yarn install - [ExpressJS license](https://github.com/expressjs/express/blob/master/LICENSE) - [NuxtJS license](https://github.com/nuxt/nuxt.js/blob/master/LICENSE.md) - [VueJS license](https://github.com/vuejs/vue/blob/master/LICENSE) + + diff --git a/template/api/index.js b/api/index.js similarity index 91% rename from template/api/index.js rename to api/index.js index 1138030..2796d4d 100644 --- a/template/api/index.js +++ b/api/index.js @@ -18,6 +18,7 @@ module.exports = app if (require.main === module) { const port = process.env.PORT || 3001 app.listen(port, () => { + // eslint-disable-next-line no-console console.log(`API server listening on port ${port}`) }) } diff --git a/template/api/routes/test.js b/api/routes/test.js similarity index 100% rename from template/api/routes/test.js rename to api/routes/test.js diff --git a/template/api/routes/users.js b/api/routes/users.js similarity index 100% rename from template/api/routes/users.js rename to api/routes/users.js diff --git a/template/assets/README.md b/assets/README.md similarity index 100% rename from template/assets/README.md rename to assets/README.md diff --git a/template/components/Logo.vue b/components/Logo.vue similarity index 97% rename from template/components/Logo.vue rename to components/Logo.vue index 50c62a2..b1de012 100644 --- a/template/components/Logo.vue +++ b/components/Logo.vue @@ -1,4 +1,3 @@ -{{{{raw}}}} -{{{{/raw}}}}