Using the API you can do CRUD operations on quotes, movies and application users.
-
[NodeJS @16.15.1] - JavaScript runtime built on Chrome's V8 JavaScript engine
-
[Express @4.18.1] - Fast, unopinionated, minimalist web framework for Node.js
-
[MongoDB] - Open source NoSQL database management program
-
[mongoose @6.3.6] - elegant mongodb object modeling for node.js
-
[Typescript @4.7.4] - TypeScript is JavaScript with syntax for types
-
[Socket.IO @4.5.1] - Bidirectional and low-latency communication for every platform
-
[Swagger UI Express @4.5.0] - Serve auto-generated swagger-ui generated API docs from express
-
[express-validator @6.14.2] - express.js middlewares that wraps validator.js validator and sanitizer functions
-
[jsonwebtoken @8.5.1] - JWT.IO allows you to decode, verify and generate JWT
-
[sendgrid/mail @7.7.0] - Service for interaction with the mail endpoint of the SendGrid v3 API
-
Multer [multer @1.4.5-lts.1] - node.js middleware for handling multipart/form-data
1. First of all you need to clone repository from github:
git clone https://github.com/Saba-Var/Movie-Quotes-api.git
2. Navigate to the repository
cd movie-quotes-api-Var-saba/
3. Next step requires install all the dependencies
npm install
or
yarn install
4. Copy .env
cp .env.example .env
5. If you want you can also change default configuration of .env file and connect to mongodb
MONGO_DATABASE=movieQuotes
MONGO_PROTOCOL=mongodb
MONGO_HOST=localhost
MONGO_PORT=27017
MONGO_PASSWORD=
MONGO_USER=
SERVER_PORT=4444
FRONTEND_URI=http:https://localhost:3000
[email protected]
SENGRID_API_KEY=sendgrid-api-key
JWT_SECRET=jwt-secret
6. For the first time before run the API run following command:
npx tsc
7. After that you can run Movie Quotes API from terminal:
npm run dev
To see swagger documentation visit localhost:4444/api-docs
├─── .github
├─── public
├─── readme
├─── src
│ ├── config
│ ├── controllers
│ ├── middlewares
│ ├── models
│ ├── routes
│ ├── schemas
│ ├── utils
│ └── views
- .env
- .env.example
- .eslintrc.json
- .gitignore
- .prettierrc.json
- babel.config.json
- package-lock.json
- package.json
- README.md
- tsconfig.json