To start application: You have to install first NodeJS from here NodeJS download in your system and after installation follow these steps as below
- Clone this repo by the command
git clone -b dev https://github.com/anishVermaIsHere/social-media.git
- Create
.env
file inclient
folder.
VITE_BASE_URL='http://localhost:5000'
- And also create another
.env
file intoapi
folder.
SERVER_PORT=5000
CORS_ORIGIN='http://localhost:5173' or <YOUR_DOMAIN>
DB_URI=<YOUR_DATABASE_URI>
SALT=10
ACCESS_TOKEN_SEC_KEY=<YOUR_KEY>
REFRESH_TOKEN_SEC_KEY=<YOUR_KEY>
ACCESS_TOKEN_EXPIRY='1h'
REFRESH_TOKEN_EXPIRY='7d'
CLOUDINARY_API_KEY=<YOUR_API_KEY>
CLOUDINARY_API_SEC_KEY=<YOUR_API_SEC_KEY>
CLOUDINARY_CLOUD_NAME=<YOUR_CLOUD_NAME>
- Then start
client
app with command
npm run dev
- And start
api
server app with command
npm start
- Your app will run successfully.
ScreenShot