https://github.com/stackbuilders/nodejs-with-nix
NodeJS + nix
https://github.com/stackbuilders/nodejs-with-nix
Last synced: 10 months ago
JSON representation
NodeJS + nix
- Host: GitHub
- URL: https://github.com/stackbuilders/nodejs-with-nix
- Owner: stackbuilders
- License: mit
- Created: 2019-05-16T20:40:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T18:51:51.000Z (over 6 years ago)
- Last Synced: 2025-03-16T15:11:51.470Z (10 months ago)
- Language: Nix
- Homepage:
- Size: 529 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node.js with Nix
[](https://builtwithnix.org)
This project showcases how to develop Node.js applications with Nix.
## Requirements
Install [Nix](https://nixos.org/nix) package manager.
## Getting Started
Spawn a new shell with all project dependencies:
```sh
nix-shell
```
Install project dependencies:
```sh
npm install
```
Start the application:
```sh
node start # regular node process
# or
node run start:dev # for hot-reloading
```
## Tips & Tricks
Build the project:
```sh
nix-build
```
Update [node-packages.nix](node-packages.nix):
```sh
nix-shell
node2nix
```
## Deployment
Install [nixops](https://nixos.org/nixops/manual):
```
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
```