Skip to content

CMU-17-356/example-postgres-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Example Postgres Todo App

Client

  1. Create React Typescript client
npx create-react-app client --template typescript

Server

  1. Create folder
mkdir server
  1. Install dependencies
cd server
npm init -y
npm i typescript @types/node @types/express cors dotenv pg sequelize typeorm
  1. Add server start script to package.json file
"scripts": {
    "start": "tsc && node dist/app.js"
},
  1. Create TSConfig file (tsconfig.json)
{
    "compilerOptions": {
      "target": "es6",
      "module": "commonjs",
      "outDir": "./dist",
      "rootDir": "./src",
      "strict": true,
      "esModuleInterop": true
    }
}
  1. Add .env file within server directory
PG_URL={secret given in Slack}
  1. Create directories and add code create src/ directory with app.ts, models/Todo.ts, routes/Todo.ts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published