Budgeting webapp.
See [Dev Setup] first.
Build the stuff
npm run build
Run the server
npm run serve
Watching
npm run watch-all
Or, separately:
npm run watch-server
npm run watch-client
npm run watch-serve
Ubuntu
sudo apt update
sudo apt install postgresql postgresql-contrib
macOS
$ brew install postgresql
$ brew services restart postgresql
Test that your database is running with psql postgres
.
Ubuntu
Ignore non-fatal errors about changing directories.
$ sudo -u postgres createuser --interactive
macOS
$ createuser --interactive
Enter name of role to add: budgeter
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Ubuntu
$ sudo -u postgres psql
postgres=# \password budgeter
macOS
$ psql postgres
postgres=# \password budgeter
Ubuntu
$ sudo -u postgres createdb budgeter
macOS
$ createdb budgeter
Install direnv
if you haven't.
Create a .envrc
file in the repo root with the following contents:
export PGPASSWORD=blahblahpassword
export DINO_SESSION_SECRET=somelongsecuresecretstring
Set the PGPASSWORD
value to the password you set in step 3.
Set the DINO_SESSION_SECRET
to a long random string.
Afterwards, you may need to run direnv allow
.
sql/init.sh
$ brew install entr
$ npm install -g typescript
$ npm install
Production environment is the same as dev, but you need a SMTP server on localhost:25 to send emails.