I have the following scripts in my package.json
"scripts": {
"dev": "nodemon --exec babel-node src/index.js",
"build": "NODE_ENV=PRODUCTION babel src -d dist --copy-files",
"serve": "NODE_ENV=production node dist/index.js"
},
My application builds, but only the dist/index.js
is just served up as a file rather than being run.
I have tried to change serve
to start
but no luck.
Have also tried to run the serve
script as part of the build
with &&
- this yielded a build process that just runs.
I feel like the solution is trivial, and I am just making mistake with my scripts.
Any ideas?