Skip to content

CMU-17-356/example-mongo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Example MongoDB 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 mongoose
  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
MONGO_URI={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