Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thewasif/twitter-clone-api
Backend for twitter clone written in Nodejs, Express and MongoDB with GitHub Actions and deployed on Heroku
https://github.com/thewasif/twitter-clone-api
api backend mongoose nodejs
Last synced: about 1 month ago
JSON representation
Backend for twitter clone written in Nodejs, Express and MongoDB with GitHub Actions and deployed on Heroku
- Host: GitHub
- URL: https://github.com/thewasif/twitter-clone-api
- Owner: thewasif
- Created: 2020-06-20T07:45:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-25T08:51:00.000Z (5 months ago)
- Last Synced: 2024-08-25T09:51:53.144Z (5 months ago)
- Topics: api, backend, mongoose, nodejs
- Language: JavaScript
- Homepage: https://twitter-clon.netlify.app
- Size: 5.17 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Twitter Clone API
Backend for Twitter Clone Client
## 🧑💻 Tech Stack
- Node.js
- Expressjs
- Mongoose (MonogDB)
- JSON Web Tokens and other nodejs libraries## 🤖 Set Environment Variables
Insert all values in `.env.example` file and rename the file to `.env`
- Create a MongoDB database and paste mongo uri string or you can use mongodb locally
- Create a cloudinary account and paste API Key, Cloud name and Cloudinary Secret. This will be used for uploading photos to cloudinary
- JWT Secret can be any string## 📦 Setup
To run this app locally,
```bash
$ git clone https://github.com/MuhammadWasif/twitter-clone-api.git
$ cd twitter-clone-api
$ npm install
$ npm start
```> Don't forget to set environment variables after cloning the repo
The app wil start on http://localhost:5000
## 🐟 Run with Docker
To run the container run following commands inside the directory
- Create image
`docker build -t twitter-clone-api .`
- Run container
`docker run -d -p 5000:5000 --name=twitter-api twitter-clone-api`## ⚙️ Workflow
The API is deployed to Heroku (Platfrom as a Service) Cloud. GitHub Actions has been used for Continuous Deployment (CD)
_Happy Coding!_