./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.js
and add your db login credentials. -
npm i
to install dependencies -
node server/scripts/resetdb
to 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-live
onhttp://localhost:8000
,
Run & live reload backend files onhttp://localhost:3000
withnodemon
.
Run elm reactor
- Node.js
- Install Elm.
Editor plugins are highly recommended. - Best to
npm install -g elm-test elm-format
for.. testing and autoformatting.
Node.js/Express app with PostgreSQL.
Stuff below happens in /server
directory.
cp config.example.js config.js
and 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 resetdb
WARNING 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)