highlighter - An API written in Node.js that syntax highlights code, a simple React frontend, as well as a Discord bot that uses this API to syntax highlight code in chat.
Visit https://tonylizj.github.io/highlighter-ui/ for a user interface.
Use https://discord.com/api/oauth2/authorize?client_id=791903902874206258&permissions=10240&scope=bot to add the Discord bot to your server.
Send a POST request to http://35.206.84.30/ with three parameters: "text" containing a code block, "lang" containing the name of the language of your code, and "quality" containing one of "medium", "high", or "extreme". Visit the link above (or GET request) to see the list of supported languages.
Example:
{ "text": "const a = 5;", "lang": "typescript", "quality": "high" }
Run both at the same time!
npm install
npm start
Or one at a time:
Written in Node.js with Discord.js
To build:
npm install
npm start-bot
For security reasons, you need to input your own bot token into a .env file. This is not provided.
Written in Node.js and Express
To build:
npm install
npm start-api