GitXplorerGitXplorer
m

test-api

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
e4e951192fdade5060d4238fc0a8f28ec790676f

log the query

committed 4 years ago
Unverified
e428949f278a9594db92fbc7f58b495d2862e1ef

fix info about where request is coming from

mmzrimsek committed 4 years ago
Unverified
8e139bb1356c662ab07b8ed12f972379a27a8e73

make the logging middleware

mmzrimsek committed 4 years ago
Unverified
c85432ea279ea278bc8bf3b74f8bd3ef3e6cf955

make GET response json

mmzrimsek committed 4 years ago
Unverified
5e52aa8e7de743afc338df0c4f3bcef90bff4e5a

added a GET endpoint

mmzrimsek committed 4 years ago
Unverified
e01bc6eeebd312edc1d3f42243f1b70c886f18cb

link to repo

committed 4 years ago

README

The README file for this repository.

test-api

A barebones API running in Docker to verify data communication

Running It


Docker

  1. Make a .env file like this (change the variable to whatever port you want to use to connect to the container)
HOST_PORT=3000
  1. Use the provided Docker Compose file and just run docker-compose --env-file .env up -d

Alternatively just edit the Docker Compose file to declare the port inline and run docker-compose up -d.

Without Docker

Run npm start to start the server

Endpoints


Send your requests to localhost:3000 or whatever you configured the port to be.

Each endpoint will log some data about the request being sent.

GET

Sends back an OK with "Hello" as the response body

POST

Sends back an OK with the same body you passed it.