Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charlesread/fastify-example
Simple fastify example
https://github.com/charlesread/fastify-example
Last synced: 12 days ago
JSON representation
Simple fastify example
- Host: GitHub
- URL: https://github.com/charlesread/fastify-example
- Owner: charlesread
- Created: 2018-07-15T13:06:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-15T13:40:25.000Z (over 6 years ago)
- Last Synced: 2024-11-07T09:50:12.001Z (2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a laughably simple fastify example, used mostly in testing my containerized computing stacks.
## Running the Node app directly
```bash
$ git clone [email protected]:charlesread/fastify-example.git
$ cd fastify-example/src
$ npm i
$ node index.js
$ curl :8080 # in another shell
# ==> {"address":"192.168.0.64","date":"2018-07-15T13:10:31.534Z"}
```## Running the Node app in the supplied Docker container
```bash
$ git clone [email protected]:charlesread/fastify-example.git
$ cd fastify-example
$ ./run.sh
$ curl localhost:8080 # in another shell
# ==> {"address":"192.168.0.64","date":"2018-07-15T13:10:31.534Z"}
```