- Email or Google OAuth Signup/Signin.
- JWT Authentication with complete integration of Refresh and Access tokens.
- PostgreSQL for the DB because of its open source nature and several useful features.
- Real time chat system using web-sockets (socket-io).
- PostgreSQL database implementation using SequelizeORM for its features like relations, eager and lazy loading, read replication and more.
tweeter_demo_vid.mp4
- Clone the repository:
git clone https://github.com/alanansari/twitter_backend.git
To run the server, you need to have NodeJS installed on your machine. If you don't have it installed, you can follow the instructions here to install it.
- Setup .env file in base directory:
PORT = 3000
DATABASE_URL = ''
jwtsecretkey1 = ''
MAIL_ID = ''
MAIL_PASS = ''
GOOGLE_CLIENT_ID = ''
GOOGLE_CLIENT_SECRET = ''
GOOGLE_AUTH_URI = ''
-
Running with docker
- Using docker ( considering you have external DB setup )
docker build -t tweeter-backend . && docker run -p 3000:3000 --network=host tweeter-backend
- Using docker compose
docker-compose up
- Using docker ( considering you have external DB setup )
-
Running with local machine
-
Install dependencies
npm install
-
Run the server on localhost:
npm start
-
You can access the endpoints from your web browser following this url
http://localhost:[PORT]