We started a conversation about developer experience (DX) throughout the project:
Talking about DX (Developer Experience), it would also be good to standardize the way
we start each server.
Right now, it’s `npm start` for the api, `npm run dev` for the mobileapp
and `node server` for the website.
Also the default user of the db is philmod.
I have started laying some groundwork with the reset script (https://github.com/OpenCollective/opencollective-api/pull/38) but it needs some polishing. Indeed, you will get an error because Stripe already registered the email ops@opencollective.com.
Things to take into account
mobileapp
[Development] We run npm run dev, it will run the watch commands for the js/css and start the local server (no auto-reload here). It will run these commands in parallel with the help of foreman.
[Production] Heroku will run npm install that will trigger the postinstall hook (npm run build). Then Heroku will run the Procfile which runs the command npm start
We started a conversation about developer experience (DX) throughout the project:
Also the default user of the db is
philmod
.I have started laying some groundwork with the reset script (https://github.com/OpenCollective/opencollective-api/pull/38) but it needs some polishing. Indeed, you will get an error because Stripe already registered the email
ops@opencollective.com
.Things to take into account
mobileapp
npm run dev
, it will run the watch commands for the js/css and start the local server (no auto-reload here). It will run these commands in parallel with the help offoreman
.npm install
that will trigger thepostinstall
hook (npm run build
). Then Heroku will run theProcfile
which runs the commandnpm start
api
npm start
. I usually donodemon .
if I need autoreload (https://github.com/remy/nodemon)Procfile
withnode index.js
The difference between
mobileapp
andapi
is that we need to compiled the assets in development for themobileapp
.@xdamman suggested having
npm start --autoreload
flag. I'm not sure how to implement that yet. It's easier for me to have a separate command for now.I think that having
npm start
everywhere is a good idea.