Documentation with snippets and boiler plates, built with NuxtJS and nuxt/content. Markdown ❤️ for ever.
# setup .env
cp .env.example .env
# install dependencies
yarn
# serve with hot reload at localhost:3000
yarn dev
In SSR mode
Update .env
with current website URL like:
APP_URL='http://memorandum.website.dev'
# build for production
yarn build
Use a process manager like pm2 to start
NuxtJS app if you want SSR.
// example of ~/ecosystem.config.js for pm2
module.exports = {
apps : [
// ...
{
name: 'memorandum',
script: 'npm',
cwd: '/home/ubuntu/www/memorandum',
args: 'start',
env: {
PORT: 3001
},
},
// ...
]
}
Use .git/hooks/post-merge
like:
#!/bin/bash
yarn && yarn build
pm2 restart memorandum
Don’t forget the command sudo chmod 775 .git/hooks/post-merge
to allow system to execute this script.
To learn more, check NuxtJS documentation.
Author: ewilan-riviere
Demo: https://memorandum.ewilan-riviere.com/
Source Code: https://github.com/ewilan-riviere/memorandum
#vue #vuejs #javascript #nuxtjs #nuxt