https://github.com/saba-var/movie-quotes-api
API for Movie Quotes
https://github.com/saba-var/movie-quotes-api
express express-validator jsonwebtoken mongodb mongoose multer nodejs socket-io swagger-ui typescript yamljs
Last synced: about 2 months ago
JSON representation
API for Movie Quotes
- Host: GitHub
- URL: https://github.com/saba-var/movie-quotes-api
- Owner: Saba-Var
- Created: 2022-07-25T05:18:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-19T18:03:37.000Z (over 2 years ago)
- Last Synced: 2025-03-02T05:35:25.498Z (over 1 year ago)
- Topics: express, express-validator, jsonwebtoken, mongodb, mongoose, multer, nodejs, socket-io, swagger-ui, typescript, yamljs
- Language: TypeScript
- Homepage:
- Size: 686 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### API for Movie Quotes
Using the API you can do CRUD operations on quotes, movies and application users.
#
## Table of Contents
- [](#)
- [Table of Contents](#table-of-contents)
- [Prerequisites](#prerequisites)
- [](#-1)
- [Tech Stack](#tech-stack)
- [](#-2)
- [Getting Started](#getting-started)
- [](#-3)
- [](#-4)
- [Project Structure](#project-structure)
- [](#-5)
- [Resources](#resources)
## Prerequisites
-
_Node JS @12.X and up_
-
_npm @6 and up_
#
## Tech Stack
-
[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
#
## Getting Started
1\. First of all you need to clone repository from github:
```sh
git clone https://github.com/Saba-Var/Movie-Quotes-api.git
```
2\. Navigate to the repository
```sh
cd movie-quotes-api-Var-saba/
```
3\. Next step requires install all the dependencies
```sh
npm install
```
or
```sh
yarn install
```
4\. Copy .env
```sh
cp .env.example .env
```
5\. If you want you can also change default configuration of .env file and connect to mongodb
```sh
MONGO_DATABASE=movieQuotes
MONGO_PROTOCOL=mongodb
MONGO_HOST=localhost
MONGO_PORT=27017
MONGO_PASSWORD=
MONGO_USER=
SERVER_PORT=4444
FRONTEND_URI=http://localhost:3000
EMAIL_SENDER=sender@gmail.com
SENGRID_API_KEY=sendgrid-api-key
JWT_SECRET=jwt-secret
```
6\. For the first time before run the API run following command:
```sh
npx tsc
```
7\. After that you can run Movie Quotes API from terminal:
```sh
npm run dev
```
To see swagger documentation visit [localhost:4444/api-docs](http://localhost:4444/api-docs)
#
#
## Project Structure
```bash
├─── .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
```
#
## Resources
- [Application Details](https://redberry.gitbook.io/assignment-iv-movie-quotes-1/)
- [Git commit rules](https://redberry.gitbook.io/resources/git-is-semantikuri-komitebi)