Home  

Editor API

🗂️ A simple text file editor API to get and update file contents

Status🟢 ACTIVE 🔒 PRIVATE
URLhttps://editor.localhost
CreatedOctober 16, 2024
LanguageJavaScript
Topicsapi cors express expressjs nodejs

File Editor API is a simple node project, which allows me to launch applications to open files from a static site.

Indeed, on any of my static sites, I just have to make a fetch call on one of the end points of the project to open this file.

In order to know which application the API should open, I made a table of correspondence between the suffix and the application.

For example, if the file ends with .csv, I'll open it with TableTools. If the file ends with .md, I'll open it with IA Writer, etc.

If the request is not a file and doesn't have a suffix .something, I'll open it directly in a new Mac Finder window.

This is something that requires the execution of a (local) server. Since it is a simple node project, it is not very complicated and memory-consuming. I just have to launch it automatically at startup. I do it directly using a Bash script, which launches several things at the startup of my computer.