- Node.js: A JavaScript runtime for building scalable network applications.
- TypeScript: A superset of JavaScript that adds static types to the language.
- Express.js: A minimal and flexible Node.js web application framework.
- MongoDB: A NoSQL database for storing and retrieving data.
- Yarn: A fast, reliable, and secure package manager for Node.js.
Ensure you have the following installed on your machine:
-
Clone the repository:
git clone https://github.com/Adityagupta1625/SpeerTask.git
-
Navigate to the project directory:
cd your-project
-
Install dependencies using Yarn:
yarn
-
Create a
.env
file:Create a
.env
file in the root of your project and add the following:PORT=8000 MONGO_URI=mongodb://localhost:27017/your-database SECRET_KEY=your-secret-key
- Replace
your-database
with your MongoDB database name. - Set up your MongoDB URI. If you are using a cloud-based service, replace the
localhost:27017
part with your MongoDB connection string.
- Replace
-
Run the application in development:
yarn dev
The application will be running at
http://localhost:8000
.
-
Install MongoDB:
Download and install MongoDB from here if you haven't already.
-
Start MongoDB:
Follow the instructions for your operating system to start the MongoDB server.
-
Create a Database:
Use the MongoDB shell or a GUI tool to create a new database. Example using the MongoDB shell:
mongo use your-database
Replace
your-database
with your desired database name.
yarn start
: Start the application.yarn lint
: Automatically fix linting issues.yarn dev
: Start the application in development modeyarn format
: Runs prettier for the code formattingyarn test
: Run all test cases
Visit http://localhost:8000/api/docs
for API documentation (powered by Swagger).
This project is licensed under the MIT License - see the LICENSE file for details.