Skip to content

Instantly share code, notes, and snippets.

@jbutz
Created December 13, 2018 12:46
Show Gist options
  • Save jbutz/e95ffba1146571d8c36003b6c1a4afc7 to your computer and use it in GitHub Desktop.
Save jbutz/e95ffba1146571d8c36003b6c1a4afc7 to your computer and use it in GitHub Desktop.
Vagrant Node Development
{
"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"
}
}
#!/bin/bash
export LOGLEVEL=debug
cd /vagrant
npm install
export LOGLEVEL=info
npm run dev
# -*- 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