Discover a modern haste server based on Elysia
Warning
This project is in early beta! Bugs may occurs
-
Fast : Based on the super fast elysia framework, this haste server is very fast too (I hope).
-
Modern : Use modern libraries to run so everything is updated !
-
Configurable : Configure the server as you wish (well not for now but soon yes).
-
Copy File : Copy the page of your choice and then edit as you wish.
-
Raw File : Get the raw file by just going to
http://website.com/raw/:id -
Multiple Data Storage : Store data via file or with redis !
-
Auto Haste deletion : configure the time a haste will stay on the server.
Install Bun : Installation
Clone the repository
git clone https://github.com/TathanDev/haste-elysia.gitInstall dependencies
bun installConfigure the server in the config.ts
Start the Server
bun run devOpen http://localhost:7777/ with your browser to see the result.
Here a list of features I want to add to hastysia.
Docker File I also want to add a docker file to easily deploy the service.
A Better Name I think this name is good but can maybe change to something more profesionnal... I don't know for now
All the settings can be found in the Config Type Definiton.
To use redis, you need to give it a connection string like this.
storage: {
type: 'redis',
redis: {
connectionString: 'redis://localhost:6379'
}
}To post a file to your haste server, you need to use the /save endpoints.
You need to pass your file content in the body.
Here an exemple for vanilla javascript
const request = new XMLHttpRequest();
request.open("POST", yourHasteServerUrl);
request.setRequestHeader("Content-Type", "application/json");
request.send(JSON.stringify({ content }));