Bharat2044 /
100xDevs-Cohort3-WebDev-and-Devops
100xDevs Cohort 3 🚀 by Harkirat Singh. This repository contains Lecture Codes, Notes, Assignments, Assignment Solution Code and Some Good Articles/Blogs Link. 🔥
78/100 healthLoading repository data…
mmodoucham / repository
This repository contains a Task Management App API built using Express, PostgreSQL as the db and jest for testing. The API provides endpoints for all CRUD Operations.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository contains a Task Management App API built using ExpressJS and postgresql as the database. The API provides endpoints to manage tasks including creating, retrieving, updating, and deleting tasks.
git clone https://github.com/mmodoucham/expressjs-task-management.git
cd expressjs-api-task-management/
npm install
Before proceeding, make sure you have PostgreSQL installed and all packages installed.
Open the db.js file in your project. This file contains the configuration for connecting to the PostgreSQL database.
const pool = new Pool({
user: process.env.DB_USER,
host: process.env.DB_HOST,
database: process.env.DB_NAME,
password: process.env.DB_PASS,
port: process.env.DB_PORT,
});
.env file with the following values:# Node environment
NODE_ENV=development
# The port your application will run on
PORT=3000 # Replace with your desired port number
# PostgresDB configuration
DB_HOST=localhost # Replace with your PostgreSQL host
DB_USER=your_username # Replace with your PostgreSQL username
DB_PASS=your_password # Replace with your PostgreSQL password
DB_NAME=your_database # Replace with the name of your PostgreSQL database
DB_PORT=5432 # Replace with the port your PostgreSQL is running on
#Docker configuration
DOCKER_DB_HOST=your_docker_db_host
your_username, your_password, your_database, your_docker_db_host, etc.) with your actual PostgreSQL and application-specific values.Run the API: To run the API, use the following command:
npm run dev
The API will be accesible on http://localhost:3000.
Selected from shared topics, language and repository description—not editorial ratings.
Bharat2044 /
100xDevs Cohort 3 🚀 by Harkirat Singh. This repository contains Lecture Codes, Notes, Assignments, Assignment Solution Code and Some Good Articles/Blogs Link. 🔥
78/100 healthbaguilar6174 /
This repository contains a Rest API server created with Node, Express and Typescript, using clean architecture and best development practices. It uses MongoDB DB.
33/100 healthTo test the server, you can query http://localhost:3000/api/health using Postman or just copy it in the address bar in your browser. If the server is running, you should receive "API is up and running" as response.
/tasks/[
{
"id": 1,
"title": "Sample Task",
"description": "This is a sample task",
"duedate": "2019-08-24T14:15:22Z"
}
// ... other tasks
]
/api/tasks/{
"title": "New Task",
"description": "A new task",
"duedate": "2019-08-24T14:15:22Z"
}
{
"id": 5,
"title": "New Task",
"description": "A new task",
"duedate": "2019-08-24T14:15:22Z"
}
/api/tasks/{task_id}{
"id": 1,
"title": "Sample Task",
"description": "This is a sample task",
"duedate": "2019-08-24T14:15:22Z"
}
/tasks/{
"title": "Updated Task",
"description": "An updated task",
"duedate": "2019-08-24T14:15:22Z"
}
{
"id": 1,
"title": "Updated Task",
"description": "An updated task",
"duedate": "2019-08-24T14:15:22Z"
}
/tasks/Swagger UI provides an interactive interface for testing and exploring your API endpoints. Follow the steps below to use Swagger UI and test the endpoints of the Task Management API.
/docs to the base URL of your application. Replace http://localhost:3000 with your actual base URL.Apart from using Swagger UI, you can also use Postman to test your Task Management App API endpoints. Here's how you can import the Swagger documentation into Postman for testing:
Open Postman and follow these steps:
File>Importhttp://localhost:3000/docs.json
Two test suites were written. One for end-to-end testing and another for unit testing the controller functions. Please note the following before running the tests. Note:
src/tests/e2e/e2e.test.ts Line 10 to select the ID of the test to be updated and deleted to avoid flakiness. const testTaskID = //ID here;
Running both Test Suites Use the command below to run both the e2e and unit tests suites at once
npm run test
Running e2e Test Suite Use the command below to run the e2e test suite only.
npm run test:e2e
Running the unit test Suite Use the command below to run the unit test suite only.
npm run test:unit
Docker Compose is a tool that enables you to define and manage multi-container Docker applications. In your case, you already have Dockerfile configurations and a docker-compose.yml file to streamline the process.
Install Docker Compose: If you don't have Docker Compose installed, you can follow the installation instructions provided on the Docker Compose website.
Navigate to Project Directory:
Open a terminal and navigate to the base directory containing the Dockerfile and docker-compose.yml.
Build and Start Containers:
Run the following command to build and start the containers defined in the docker-compose.yml file:
docker-compose up --build
Access the API:
Once the containers are up and running, your API should be accessible through a web browser or API client at the specified port, which is likely the same as what's defined in your .env file.
Stopping the Containers:
When you're finished testing, you can stop the containers gracefully by returning to the terminal and pressing Ctrl+C
Cleaning Up: To remove the containers and clean up resources, run the following command:
docker-compose down
riaudevops /
This repository contains the backend code for setoran hafalan services. Developed with Express TypeScript + PrismaORM + PostgreSQL, it manages the core logic, data handling, and secure processing of recitation records. Essential for supporting the academic requirements at UIN Suska Riau.
35/100 healthThis repository contains a HR analytics application built with a microservices architecture using a combination of Redis, TypeScript, MongoDB, Next.js, React, Express, Docker, Kubernetes
27/100 healthMiggiV2 /
This repository contains exam cheat sheets for Angular, React, Express.js, TypeScript, and Docker, based on the "Web Development" course
34/100 healthgeekyharsh05 /
This repository contains a backend for course selling application built with Express.js and MongoDB and written in typescript .
29/100 health