This project showcases how to develop Node.js applications with Nix.
Install Nix package manager.
Spawn a new shell with all project dependencies:
nix-shell
Install project dependencies:
npm install
Start the application:
node start # regular node process
# or
node run start:dev # for hot-reloading
Build the project:
nix-build
Update node-packages.nix:
nix-shell
node2nix
Install nixops:
nix-env -i nixops
Create a deployment:
nixops create ./nodejs-with-nix.nix ./nodejs-with-nix-vbox.nix -d nodejs-with-nix
Start the deployment:
nixops deploy -d nodejs-with-nix