Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/platformatic/acme-base
The base to all Acme Inc. microservices
https://github.com/platformatic/acme-base
Last synced: about 1 month ago
JSON representation
The base to all Acme Inc. microservices
- Host: GitHub
- URL: https://github.com/platformatic/acme-base
- Owner: platformatic
- License: apache-2.0
- Created: 2023-09-20T13:26:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:45:10.000Z (about 1 year ago)
- Last Synced: 2024-05-06T12:24:35.143Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @platformatic/acme-base
This is foundation piece for all Acme development.
All microservices developed in Acme use this tool.## Install
```bash
npm install platformatic @platformatic/acme-base
```## Usage
Create a file `platformatic.json` in your root folder:
```json
{
"$schema": "https://raw.githubusercontent.com/platformatic/acme-base/main/schemas/1.json",
"module": "../index.js",
"server": {
"hostname": "{{HOSTNAME}}",
"port": "{{PORT}}"
},
"dynamite": true,
"watch": "{{WATCH}}"
}
````HOSTNAME`, `PORT` and `WATCH` are environment variables that are automatically loaded from a `.env` file
in the folder, like so:```
WATCH=true
HOSTNAME=127.0.0.1
PORT=8080
```Utilities should be placed inside the `plugins/` folder, while [routes](https://fastify.dev/docs/latest/Reference/Routes/#routes) should be defined in `routes/` .
Both should be defined as Fastify [plugins](https://fastify.dev/docs/latest/Reference/Plugins).## License
Apache-2.0