./build to package the app into executable which ends up in ./dist
-
Prerequisites: Git, Node.js, PostgreSQL and Elm
-
Create your PostgreSQL database.
-
cd server && cp config-example.js config.jsand add your db login credentials. -
npm ito install dependencies -
node server/scripts/resetdbto create db tables.
./run or open run-win.bat on Windows to run the app.
Builds & minifies Elm , serves Node backend and opens browser with Frontend app.
./dev
Run & live reload withelm-liveonhttp://localhost:8000,
Run & live reload backend files onhttp://localhost:3000withnodemon.
Run elm reactor
- Node.js
- Install Elm.
Editor plugins are highly recommended. - Best to
npm install -g elm-test elm-formatfor.. testing and autoformatting.
Node.js/Express app with PostgreSQL.
Stuff below happens in /server directory.
cp config.example.js config.jsand add with your settings
Commands:
-
npm run dev
Run & live reload withnodemon -
npm run prod(Windows)
Run Node.js backend, serve frontend and open browser -
npm run resetdbWARNING You will lose all data!
Wipes the whole database and recreates it.
- Fix production version:
- No console.logs
- Open browser straight from node (dev mode -> no browser open because the elm refresh keeps opening new tabs)