Skip to content

Ankan002/chit-chats-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chit Chats API

An API to manage all workings of the main Chit Chats app.

Getting Started

  • First of all create a folder and open a terminal on it.

  • Now run this following command to clone the repo: git clone https://github.com/Ankan002/chit-chats-backend.git.

  • You should now go into the cloned directory.

  • Open up the directory in to a code editor now.

  • Finally create a .env file.

  • Now create the following environment variables:

    • PORT: This variable defines on which PORT number the app will run. Not required for production if deployed on HEROKU

    • SECRET: This variable defines secret key for Jsonwebtoken (JWT).

    • DB_URI: This will define the MongoDB database to which the app will get connected.

    • CLOUDINARY_NAME: This variable defines cloudinary cloud name.

    • CLOUDINARY_API_KEY: This variable defines cloudinary API key.

    • CLOUDINARY_API_SECRET: This variable defines cloudinary API secret.

  • Failure in putting up of any of these environment variables might lead to crashing of the app.

  • Now go back to the terminal and run first npm i -g typescript.

  • Then run yarn to install all the dependencies.

  • Finally run yarn dev to start the development server.

  • Note: If there is a ts-node error then again run npm i -g ts-node

That's it you are ready to test the app locally. Once app starts successfully you will be able to see the following in your terminal:

App is running at port ${PORT}
Connected to DB

NodeJS Express.js MongoDB JWT Socket.io Heroku TypeScript Couldinary Jest GitHub Yarn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published