🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@platformatic/acme-base

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/acme-base

The base to all Acme Inc. microservices

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
6
Created
Source

@platformatic/acme-base

This is foundation piece for all Acme development. All microservices developed in Acme use this tool.

Install

npm install platformatic @platformatic/acme-base

Usage

Create a file platformatic.json in your root folder:

{
  "$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 should be defined in routes/ . Both should be defined as Fastify plugins.

License

Apache-2.0

FAQs

Package last updated on 23 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts