Skip to content

safwanyp/node-express-hello-world

Repository files navigation

Hello World API with Node and Express

A simple Express.js application built to work with Google Cloud Platform's serverless suite.

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!"
    }
}

About

A simple Node + Express app built with GCP's Serverless Suite

Resources

Stars

Watchers

Forks

Languages