A Dockerized Express.js API backend for the Assam CEE College Predictor
201
This Docker image provides the backend API for the Assam CEE College Predictor, a web service built using Express.js and Node.js. It delivers college prediction results based on candidate ranks, seat categories, and historical cutoff data.
The API is designed to integrate with a frontend application and can be deployed as a microservice or standalone server. It is containerized using Docker for easy setup, deployment, and scalability.
Key features:
Prerequisites:
docker pull ceepredictor/cee-backend-api
docker run -d -p 3000:3000 ceepredictor/cee-backend-api
Once the container is running, you can test the API using curl or any API client (like Postman or Insomnia).
curl --location 'http://localhost:3000/api/v1/predict' \
--header 'Content-Type: application/json' \
--data '{
"rank": 89,
"marks": null,
"category": "GENERAL",
"govt_reservation": 0
}'
You can configure environment variables (like database URLs or secret keys) using the -e flag or a .env file depending on your setup.
| Variable | Example | Description |
|---|---|---|
PORT | 3000 | Port on which the Express server listens |
NODE_ENV | development | Node environment (e.g., development or production) |
PG_DATABASE_URL | postgres://user:password@localhost:5432/dbname | URL for connecting to the PostgreSQL database |
REDIS_URL | redis://localhost:6379 | URL for connecting to the Redis instance |
SENTRY_DSN | https://[email protected]/0 | DSN (Data Source Name) for Sentry error tracking |
BACKEND_URL | http://localhost:3000 | URL of the backend server |
ALLOWED_ORIGINS | ["http://localhost:3000", "https://yourdomain.com"] | List of allowed origins for cross-origin requests (e.g., http://localhost) |
Content type
Image
Digest
sha256:50b218231โฆ
Size
65.5 MB
Last updated
about 1 year ago
docker pull ceepredictor/cee-backend-api:5