Request Management Form for College Students and Faculties
pnpm install
npm install
bun install
To set up the application with Docker, ensure you have Docker installed and running. Use the following command in your project's root directory:
docker-compose up
This command will start the PostgreSQL container and any other services defined in your docker-compose.yml
file.
After installing the dependencies, you need to generate the Prisma client, run the migrations, and seed the database.
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed
npx prisma generate
npx prisma migrate dev --name init
npx prisma db seed
bun prisma generate
bun prisma migrate dev --name init
bun prisma db seed
Ensure that your Docker containers are running. You can execute the following commands inside your Docker container:
docker exec -it <container_name_or_id> npx prisma generate
docker exec -it <container_name_or_id> npx prisma migrate dev --name init
docker exec -it <container_name_or_id> npx prisma db seed
Replace <container_name_or_id>
with the actual name or ID of your Docker container.
Create a .env
file in the root of your project and add the following environment variables:
DATABASE_URL="postgres://username:password@localhost:5432/database"
JWT_SECRET="your-secret-key"
Replace username
, password
, database
, and your-secret-key
with your actual database credentials and a secure secret key.
pnpm start:dev
npm run start:dev
bun run start:dev
To run the application using Docker:
docker-compose up app
This command will start your application containerized in Docker.
🎉 Congratulations! Your application is now running.
Testing the API Endpoint To test the API endpoint, use a API management software like Postman or Hoppscotch:
Method: GET URL: http://localhost:8000/department Make sure your application is running and accessible at http://localhost:8000. Replace /department with the appropriate endpoint path according to your API design.