Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thenamevishnu/short-link-api
Short Links Api
https://github.com/thenamevishnu/short-link-api
api es6-modules expressjs nodejs rest-api
Last synced: about 2 months ago
JSON representation
Short Links Api
- Host: GitHub
- URL: https://github.com/thenamevishnu/short-link-api
- Owner: thenamevishnu
- Created: 2024-02-05T11:13:12.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-02-05T12:06:14.000Z (11 months ago)
- Last Synced: 2024-04-18T13:03:38.928Z (9 months ago)
- Topics: api, es6-modules, expressjs, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SHORT URL API
Create a short link from a long url
## API Reference
#### Create Short Link
```http
POST /short-link
```| Body | Type | Description |
| :-------- | :------- | :------------------------- |
| `link` | `string` | **Required**. Long url |## Response
```JSON
{
short_link: https://example.in/r/ICfoqnoDtz
}
```## Run Locally
Clone the project
```bash
git clone https://github.com/thenamevishnu/short-link-api.git
```Install dependencies
```bash
npm install
```Start the server
```bash
npm start
```## Environment Variables
To run this project, you will need to add the following environment variables to your .env file
`PORT = {YOUR PORT}`
`MONGODB_URL = mongodb://127.0.0.1:27017/dbName`
`MONGODB_DB_NAME = dbName`
`SERVER_URL = http://localhost:{YOUR PORT}`
## Authors
- [@thenamevishnu](https://www.github.com/thenamevishnu)