Autora is a URL Shortener made using Express.js and SQLITE. It's very easy to setup, the following are the requirements:
- Node.js v14+.
- Full permissions to the folder autora run's in.
git clone https://github.com/CosmicIceDev/autora.cd autora.npm install.- Modify config.js with your own values.
- Create a directory called
db, and create a file inside the directory with whatever name you used inconfig.jsfordbFileName, or if you left it as it was, name itautora.sqlite3. - Use pm2 (
npm i -g pm2,pm2 start index.js) or run the server usingnode index.js.
Congrats! You've setup your own instance of Autora!
- Without Custom Slug
Input:
http://[host]/api/new?url=https://example.com
Output:
{
"status": 200,
"longUrl": "https://example.com",
"shortUrl": "http://[host]/[generated-slug]"
}- With Custom Slug
Input:
http://[host]/api/new?url=https://example.com&slug=example
Output:
{
"status": 200,
"longUrl": "https://example.com",
"shortUrl": "http://[host]/example"
}Feel free to contribute, and create an Issue if any.
(c) cosmicice 2020. This project is licensed under the Creative Commons Zero v1.0 Universal License.