A simple Express.js application built to work with Google Cloud Platform's serverless suite.
- Built with Express.js on a Node.js runtime
- PostgreSQL on GCP's Cloud SQL
- GCP's Cloud Build for automatic deployments
- Deployed on GCP's Cloud Run
- Using Cloud Functions to deploy middleware services
- Using BigQuery to store app-generated logs
- Using Pub/Sub for streaming to BigQuery.
- Using Cloud Scheduler for running periodic data cleaning operations.
- Using Secret Manager to store secrets.
- Jest for testing
- JSON Schema validation with ajv
- Prettier for formatting
- ESLint for linting
- Husky for commit linting
Base URL: https://infinite-deck-397306.oa.r.appspot.com
Endpoints
- GET
/messages
(Example response below)
{
"status": "Success",
"message": [
{
"id": 1,
"created_by": "safwan",
"message": "hello"
},
{
"id": 2,
"created_by": "safwan",
"message": "hello world :D"
}
]
}
- GET
/messages/:id
(Example response below)
{
"status": "Success",
"message": {
"id": 1,
"created_by": "safwan",
"message": "hello"
}
}
- POST
/messages
- Request body must be a JSON with "created_by" and "message" fields. For example:
{
"created_by": "Safwan Parkar",
"message": "Hello World!"
}
The response for this would be:
{
"status": "Success",
"message": {
"id": 999,
"created_by": "Safwan Parkar",
"message": "Hello World!"
}
}