alfaarghya / alfa-leetcode-api

It's a custom leetcode api. This API provides endpoints to retrieve details about a user's profile, badges, solved questions, contest details, contest history, submissions, calendar and and also daily questions, selected problem, list of problems.
https://alfa-leetcode-api.onrender.com/
MIT License
142 stars 58 forks source link

Using PORT environment variable #10

Closed kvqn closed 2 months ago

kvqn commented 2 months ago

I noticed that the project uses 3000 port for hosting the project. In order to change the port, you would have to edit the config.ts file.

I made a tiny change to prefer the environment variable PORT and fall back to the original value of 3000.

Doing so would make it much easier to set up as you can just do something like

PORT=3001 npm run start

on any linux server.

alfaarghya commented 2 months ago

@kvqn Thank u for your contribution 🚀