Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ayushbasak/chotaurl-api

a url shortener / obfuscater REST API
https://github.com/ayushbasak/chotaurl-api

chotaurl-api heroku obfuscator pastebin rest url-shortener

Last synced: 3 months ago
JSON representation

a url shortener / obfuscater REST API

Awesome Lists containing this project

README

        

# ChotaURL-api
***
### Rest API for url shortening / obfuscation and pastebin clone

## Installation

* run `$ npm install`
* create a `.env` file and add
`DB_URI=`
* run **schema.sql** to create tables for your database

You can get away by not integrating **Auth0**.

### Usage
If using localmachine, use [localhost](http://localhost:5000/)
otherwise use [ctlnk](https://ctlnk.herokuapp.com)

1. #### URL Shortener / obfuscator

* `GET https://ctlnk.herokuapp.com/q/`
* `POST https://ctlnk.herokuapp.com/q/`
```js
{
url: '',
flavor: '' [optional]
}
```

2. #### Pastebin Clone
* `GET https://ctlnk.herokuapp.com/p/`
* `POST https://ctlnk.herokuapp.com/p/`

```js
{
title: '',
content: '',
language: '' [optional]
}
```

### ErrorIds
* 1 ERROR_CREATION
* 2 ERROR_INVALID_URL
* 3 ERROR_AUTHENTICATION [Admin Authentication]
* 4 ERROR_INVALID_USER

#### My deployed version

[site](https://chotaurl.vercel.app) | [github](https://github.com/ayushbasak/chotaurl)

License: [ [MIT](LICENSE) ]