Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeiss/zdp-codingcase
https://github.com/zeiss/zdp-codingcase
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/zeiss/zdp-codingcase
- Owner: ZEISS
- Created: 2024-03-27T10:28:07.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-27T15:39:46.000Z (8 months ago)
- Last Synced: 2024-04-14T23:24:38.768Z (7 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZEISS Machine Data API
This project is a REST API built with TypeScript and Express.js that exposes machine data as JSON. It can be run as a local Docker container.
## Running the Application
To run the application as a local Docker container, follow these steps:
1. Make sure you have Docker installed on your machine.
2. Build the Docker image by running the following command in the project root directory:
```
docker compose up --build
```4. The API will be accessible at `http://localhost:3000/api/v1` and the WebSocket at `ws://localhost:4000`.
5. A sample connection to the Websocket is implemented under ws-connect->wsConnection.js.
6. Shut the Docker container down by running the following command in the project root directory:
```
docker compose down
```## API Documentation
The API exposes the following endpoints:
- `GET /machines`: Retrieves all machines and their status.
- `GET /machines/:id`: Retrieves the event history for one specific machine identified by the UUID.Please refer to the source code for more details on the request and response formats.