https://github.com/nuclearredeye/typescript-service
A Typescript Service template that can be used as a seed for new projects.
https://github.com/nuclearredeye/typescript-service
template typescript
Last synced: 16 days ago
JSON representation
A Typescript Service template that can be used as a seed for new projects.
- Host: GitHub
- URL: https://github.com/nuclearredeye/typescript-service
- Owner: NuclearRedeye
- License: mit
- Created: 2019-09-30T12:49:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-09T09:02:23.000Z (over 4 years ago)
- Last Synced: 2025-02-28T22:19:53.327Z (over 1 year ago)
- Topics: template, typescript
- Language: TypeScript
- Homepage:
- Size: 134 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Typescript Service
An experiment in how to create a service in typescript that makes use of the library experiment.
## Prerequisites
* You have a Linux or OSX machine. Windows should be supported via WSL 2 but has not been tested.
* You have installed a recent version of [GNU Make](https://www.gnu.org/software/make/).
* You have installed a recent version of [Docker](https://www.docker.com/).
## Quick Start
You can build the project for development using...
```
make
```
You can also package the project for distribution using...
```
make release
docker build -t typescript-service:latest .
```
## Usage
Once the service is running, you can use cURL to send requests to it...
```
curl -d '{"a":10, "b":5}' -H "Content-Type: application/json" -X POST http://localhost:8080/add
curl -d '{"a":10, "b":5}' -H "Content-Type: application/json" -X POST http://localhost:8080/subtract
curl -d '{"a":10, "b":5}' -H "Content-Type: application/json" -X POST http://localhost:8080/multiply
curl -d '{"a":10, "b":5}' -H "Content-Type: application/json" -X POST http://localhost:8080/divide
```
## License
Licensed under [MIT](https://choosealicense.com/licenses/mit/).