Created
December 13, 2018 12:46
-
-
Save jbutz/e95ffba1146571d8c36003b6c1a4afc7 to your computer and use it in GitHub Desktop.
Vagrant Node Development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "vagrant-node-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js", | |
"dev": "nodemon index.js" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"nodemon": "^1.18.8" | |
}, | |
"dependencies": { | |
"koa": "^2.6.2" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export LOGLEVEL=debug | |
cd /vagrant | |
npm install | |
export LOGLEVEL=info | |
npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.network "forwarded_port", guest: 3000, host: 3000 | |
config.vm.provider "docker" do |d| | |
d.image = "node:10" | |
d.cmd = ["/vagrant/bin/run-dev-vagrant.sh"] | |
d.remains_running = true | |
d.env = { | |
PORT: 3000 | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment