larsthorup / js-fullstack-sandbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

js-fullstack-sandbox

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.

initial setup

# 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

database

# run `recreate.sql` on the instance

run locally

Use two terminals:

1:

npm start

2:

cd app
npm start

deploy

cd app
npm run build
cd ..
netlify deploy --prod
netlify open:site

About

License:MIT License


Languages

Language:JavaScript 75.0%Language:HTML 16.2%Language:CSS 8.7%