🚀 Robin Network Server Setup
Follow these steps to run the project locally.
1️⃣ Install Dependencies
npm install
2️⃣ Run PostgreSQL
Make sure PostgreSQL is installed and running on your system.
Create the database if it does not exist:
CREATE DATABASE robin_network;
Default database configuration used in this project:
- Host: localhost
- Port: 5432
- User: postgres
- Password: 1234
- Database: robin_network
3️⃣ Create .env File
Create a .env file in the root directory and add:
PORT=4000
# Database
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASSWORD=1234
DATABASE_NAME=robin_network
OTP_EXPIRE_TIME_MINUTES=5
JWT_SECRET=IOnf9828bcoeiwfnoUTFDIUWNDOINiuesvfc7632biUBEC&OInuy2vciabkjmcpqocuyBIUBFUEYVXUWVD
JWT_EXPIRATION=10d
JWT_EXPIRATION_IN_HOUR=240
4️⃣ Run Database Migrations
npm run migration:run
5️⃣ Create Admin User Manually
After migrations are completed, create an admin user manually in PostgreSQL.
Example:
INSERT INTO users (id, username, email, role)
VALUES (
'a random uuid',
'your_username',
'your_email@example.com',
'admin'
);
6️⃣ Start the Application
npm start
✅ Application URL
If everything is configured correctly, the server will run at:
http://localhost:4000
Description
Languages
TypeScript
97.9%
JavaScript
1.2%
EJS
0.5%
Dockerfile
0.4%