This project is a working example of a simple full stack JavaScript application using PostgreSQL, Express.js and React. You can create your own project from scratch by following the guide.
# database hosting
# configure a PostgreSQL instance, e.g. on elephantsql.com
# create server/src/env.json from .env.sample.json and set DATABASE
# web hosting
npm install -g netlify-cli
netlify login
netlify status # to get your team name, such as lars-1234567
netlify sites:create --name dreams-lars-1234567 --account-slug lars-1234567
netlify link --name dreams-lars-1234567
# node.js dependencies
cd app
npm install
cd ../server
npm install
# run `recreate.sql` on the instance
Use two terminals:
1:
npm start
2:
cd app
npm start
cd app
npm run build
cd ..
netlify deploy --prod
netlify open:site