A NodeJS Express API for querying eolas-db, the database of my zettelkasten.
Find a file
thomasabishop 9d92a20872
Some checks failed
Deploy eolas-api / deploy (push) Failing after 26s
feat: add search endpoint
2025-12-11 19:14:45 +00:00
.forgejo/workflows
src feat: add search endpoint 2025-12-11 19:14:45 +00:00
systemd
.gitignore
package-lock.json feat: add morgan for logging 2025-10-19 12:31:11 +01:00
package.json feat: add morgan for logging 2025-10-19 12:31:11 +01:00
README.md chore: update readme 2025-12-08 17:42:14 +00:00

eolas-api

API written in NodeJS that queries my Zettelkasten, Eolas.

It is a constituent part of my knowledge management system comprising eolas, eolas-db, and eolas-app.

The application reads from an SQLite database managed via eolas-db.

Local development

npm install
npm run start

This will start the local server at http://localhost:4000. It will look for stub database at /data/eolas.db.

Deployment

The API is deployed to my remote VPS, residing at /var/www/eolas-api. The database that it reads from is located at /data/sqlite/eolas/eolas.db.

Deployment is automated via Forgejo action. Deployment actions are always executed by the deploy user on the VPS.

The action script transfers the source files to the VPS and installs necessary packages. It also restarts the eolas-api systemd service on the VPS.

systemd service

On the VPS, eolas-api runs as a systemd service. See the unit file for details.

API

Entries

Get all entries

Return all entries. Optionally limit by length and/or date.

GET /entries?limit=2&sort=date
{
  "count": 5,
  "data": [
    {
      "title": "SSH",
      "last_modified": "2025-07-10 14:26:04"
    },
    {
      "title": "List_largest_files_bash",
      "last_modified": "2025-07-07 16:49:12"
    }
  ]
}

Get specific entry

GET /entries/Memory_versus_processor
{
  "title": "Memory_versus_processor",
  "last_modified": "2024-10-18 19:17:01",
  "size": 270,
  "body": "# Memory versus processor\n\n Would a more powerful processor with average or reduced memory capacity..."
}

Get backlinks for an entry

Defaults to alphabetic list.

GET /entries/backlinks/The_kernel
{
  "count": 3,
  "data": ["Boot_process", "Containerization", "CPU_architecture"]
}

Get outlinks for an entry

Defaults to alphabetic list.

GET /entries/outlinks/The_kernel
{
  "count": 3,
  "data": ["Basic_model_of_the_operating_system", "Processes", "User_Space"]
}

Get entries associated with a specified tag

Optionally sort chronologically.

GET /entries/tag/memory?sort=date
{
  "count": 3,
  "data": [
    {
      "entry_title": "Memory_addresses"
    },
    {
      "entry_title": "Call_stack"
    },
    {
      "entry_title": "The_memory_hierarchy"
    }
  ]
}

Tags

Get all tags

Sorted alphabetically.

GET /tags
{
  "count": 119,
  "data": ["algebra", "algorithms", "analogue", "android", "..."]
}

Get tags for specified entry

GET /tags/The_kernel
{
  "count": 4,
  "data": [
    "computer-architecture",
    "memory",
    "operating-systems",
    "systems-programming"
  ]
}