https://github.com/lastmjs/zwitterion-production
https://github.com/lastmjs/zwitterion-production
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lastmjs/zwitterion-production
- Owner: lastmjs
- License: mit
- Created: 2017-02-18T01:25:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-07T00:00:29.000Z (over 8 years ago)
- Last Synced: 2025-01-19T22:48:33.825Z (11 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPRECATED IN FAVOR OF https://github.com/lastmjs/zwitterion
# zwitterion-production
## Installation
```
sudo apt-get update
sudo apt-get install nginx
```
## Use
### Development Use
Start the server: `npm start`
Stop the server: `npm run stop`
### Production Use
Make sure the machine that you deploy to has NGINX installed.
#### Dokku
If you are using Dokku, do the following:
```
//The following is for HTTPS
//find your public key and private key, and transform them into the format that dokku needs
cat [public-key].pem > server.crt
cat [private-key].pem > server.key
dokku certs:add [app-name] server.crt server.key
```
#### Custom
```
sudo apt-get update //make sure packages are up to date
sudo apt-get upgrade // not sure exactly what this does, look into it
sudo apt-get install nginx
//What does the -y option on the apt-get command do?
```
NGINX https config:
```
# redirect all http GET traffic to https
server {
listen 80;
server_name solutiamaxima.com www.solutiamaxima.com;
return 301 https://solutiamaxima.com$request_uri;
}
server {
listen 443 ssl;
server_name solutiamaxima.com www.solutiamaxima.com;
root /home/ubuntu/test-nginx;
ssl_certificate /etc/letsencrypt/live/solutiamaxima.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/solutiamaxima.com/privkey.pem;
}
```
How to get a Let's Encrypt certificate:
```
sudo apt-get install letsencrypt
sudo letsencrypt certonly --standalone -d solutiamaxima.com -d www.solutiamaxima.com
//now set up nginx to point to the certificate location...
```