Fix Vagrant dev environment

Adding the `-L` flag to nodemon, else it doesn't see our changes.
This commit is contained in:
Annika Backstrom 2019-12-14 18:56:54 -05:00
parent 058f57919a
commit a6a9050afc
4 changed files with 14 additions and 7 deletions

View File

@ -28,6 +28,14 @@ for my own convenience:
## Development
This project supports Vagrant, if you don't want to install the packages
locally:
vagrant up
vagrant ssh -c 'cd /vagrant && npm run watch'
You can also just run from the checkout if your environment supports it.
`npm run watch` will use nodemon to restart the server when any file changes.
Dummy versions of `mpg321` and the tag reader are available in the `bin`

10
Vagrantfile vendored
View File

@ -1,5 +1,5 @@
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.box = "ubuntu/bionic64"
config.vm.network :private_network, ip: '10.76.91.201'
config.vm.hostname = "jukebox.pi"
@ -15,11 +15,9 @@ Vagrant.configure("2") do |config|
cache_dir = local_cache(config.vm.box)
config.vm.synced_folder cache_dir, "/var/cache/apt/archives"
config.vm.provision "shell" do |s|
s.inline = "sudo apt update -y"
s.inline = "sudo apt upgrade -y"
s.inline = "sudo apt install -y make nodejs npm nodejs-legacy"
end
config.vm.provision "shell", inline: "sudo apt-get update -y"
config.vm.provision "shell", inline: "sudo apt-get upgrade -y"
config.vm.provision "shell", inline: "sudo apt-get install -y make nodejs npm"
end
# vim:set ts=2 sw=2 et:

View File

@ -5,5 +5,6 @@
, "jukebox"
, "templates"
, "bin/tag-reader-dummy"
, "config.json"
]
}

View File

@ -8,7 +8,7 @@
"url": "https://git.abackstrom.com/annika/pi-rfid-jukebox"
},
"scripts": {
"watch": "nodemon player -e js,jade",
"watch": "nodemon -L player -e js,jade",
"start": "node player"
},
"author": "Annika Backstrom",