@truto/truto-daemon
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Truto Daemon Starter Kit

This is a starter kit for creating a Truto Daemon. It uses Bun.sh.

Installation

  1. Install Bun.sh
  2. Install dependencies using bun install
  3. Copy the .env.example to .env and change the values to your own.
  4. Run the server using bun dev

SQLite

It uses SQLite as the database and is stored at <project_root>/sqlite.db by default. To change the location, you can change the .env file.

Deployment

  1. Build the app using bun run build-linux.
  2. scp the binary to the server.
  3. chmod +x the binary.
  4. sudo setcap CAP_NET_BIND_SERVICE=+eip the binary.
  5. Copy over the .env file to the server.
  6. Copy over the truto-daemon.service file to /etc/systemd/system/.
  7. Replace the ExecStart and EnvironmentFile attributes in the service file to the actual path on the server.
  8. Run the following commands:
    • sudo systemctl daemon-reload
    • sudo systemctl enable truto-daemon
    • sudo systemctl start truto-daemon
    • sudo systemctl status truto-daemon to check the status of the service.
    • sudo journalctl -t truto-daemon to check the logs of the service.

Readme

Keywords

none

Package Sidebar

Install

npm i @truto/truto-daemon

Weekly Downloads

1

Version

0.0.4

License

none

Unpacked Size

15 kB

Total Files

8

Last publish

Collaborators

  • truto