Blog App is a Node.js application with Express.js framework and Server Side Rendering from Nuxt.js.
Clone this repo to your local machine using:
git clone https://github.com/pavel-wh/nuxt-blog
Use the Node package manager npm to install this app.
npm install
-
Sign in to mongodb Create project, build cluster and create database.
-
Create keys.dev.js in
./server/keys/
folder with code below and removeapp.use(sslRedirect())
from./server/app.js
for local dev
module.exports = {
MONGO_URI:
'mongodb+srv://username:[email protected]/test?retryWrites=true&w=majority',
JWT: 'jwt-secret-phrase'
}
- Add your local IP to Whitelist
Remove middleware: ['admin-auth'],
from ./pages/admin/users.vue
# serve with hot reload at localhost:3000
npm run dev
# build for production and launch server
npm run build
npm run start
# generate static project
npm run generate
Go to https://URL/admin/users
and create Admin user
next add back middleware: ['admin-auth'],
to ./pages/admin/users.vue
For detailed explanation on how things work, check out Nuxt.js docs.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.