LonChat - Backend

LonChat-Backend is a backend for LonChat application. Built with NodeJs using the ExpressJs Framework. Express.js is a web application framework for Node.js. More about Express

Built With

Express.js Node.js Socket.io

Requirements

  1. Node Js
  2. Postman
  3. Xampp
  4. Socket.io

How to run the app ?

  1. Open app's directory in CMD or Terminal
  2. Type npm install
  3. Make new file a called .env, set up first here
  4. Turn on Apache and MYSQL Server using xampp, etc.
  5. Create a database with the name lonchat then import file lonchat.sql in directory root/database to phpmyadmin
  6. Open Postman desktop application or Chrome web app extension that has installed before
  7. Choose HTTP Method and enter request url.
  8. You can see all the end point here

Set up .env file

Open .env file on your favorite code editor, and copy paste this code below :

PORT = [YOUR_SERVER_PORT]
DB_HOST = localhost
DB_NAME = lonchat
DB_USER = [YOUR_DB_USER]
DB_PASS = [YOUR_DB_PASSWORD]
BASE_URL = http://localhost:[PORT]
EMAIL_USERNAME = [YOUR_EMAIL_USERNAME]
EMAIL_PASSWORD = [YOUR_EMAIL_PASSWORD]
ACCESS_TOKEN_KEY = [YOUR_ACCESS_TOKEN_KEY]
REFRESH_TOKEN_KEY = [YOUR_REFRESH_TOKEN_KEY]

API Request Example

Run in Postman

Related Project

Contact