# matise-bag

> My delightful Nuxt.js project

## Build Setup

``` bash
# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm start

# generate static project
$ npm run generate
```

For detailed explanation on how things work, checkout [Nuxt.js docs](https://nuxtjs.org).

Deployment:
digital ocean droplet nodejs one clickapp

update nodejs
    # Using Ubuntu
    `curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -`
    `sudo apt-get install -y nodejs`

install nginx
    `sudo apt-get update`
    `sudo apt-get install nginx`

`/etc/nginx/sites-available/default`

```
server {
        listen 80;

        server_name staging.bag.matise.nl;

        root /home/staging;
        index index.html;

        location / {
           proxy_pass http://localhost:3001;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection 'upgrade';
           proxy_set_header Host $host;
           proxy_cache_bypass $http_upgrade;
        }
}
```

`pm2 start npm --name "matisebag-staging" -- run start-staging`
