Deploy
Nix create api but you want put in a server like a heroku. It's easy.
Heroku
No define port, heroku export a process.env.PORT, relax, nix use this.
1 - Install nix
npm install --save nix-api
1
2 - Create a folder with your content
|_node_modules/
|_package.json
|_source << here (source name is a example)
|_|_image.png
|_|_anything.md
|_|_omg.js
1
2
3
4
5
6
2
3
4
5
6
3 - Create a start script in package.json
"scripts": {
"start": "./node_modules/.bin/nix-api --dir source"
}
1
2
3
2
3
4 - Deploying
heroku create
git add .
git commit -m "My deploy"
git push heroku master
1
2
3
4
5
6
7
2
3
4
5
6
7