https://github.com/remarkablemark/replit-url-shortener
Replit URL Shortener
https://github.com/remarkablemark/replit-url-shortener
express nanoid nodejs replit replitdb url-shortener
Last synced: 7 months ago
JSON representation
Replit URL Shortener
- Host: GitHub
- URL: https://github.com/remarkablemark/replit-url-shortener
- Owner: remarkablemark
- License: mit
- Created: 2021-01-07T01:38:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-10T19:58:00.000Z (over 3 years ago)
- Last Synced: 2025-02-28T21:02:25.001Z (7 months ago)
- Topics: express, nanoid, nodejs, replit, replitdb, url-shortener
- Language: JavaScript
- Homepage: https://replit.com/@remarkablemark/URL-Shortener
- Size: 8.79 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Replit URL Shortener
[](https://replit.com/github/remarkablemark/URL-Shortener)

[](https://opensource.org/licenses/MIT)[Replit URL shortener](https://replit.com/@remarkablemark/URL-Shortener). Read the [blog post](https://remarkablemark.org/blog/2021/01/08/replit-url-shortener/).
## Prerequisites
- [Node.js](https://nodejs.org/)
- [npm](https://www.npmjs.com/get-npm)## Install
Clone repository:
```sh
git clone https://github.com/remarkablemark/Replit-URL-Shortener.git
cd Replit-URL-Shortener
```Install dependencies:
```sh
npm install
```## Scripts
In the project directory, you can run:
### `npm start`
Runs the app.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The environment variable `REPLIT_DB_URL` must be set for the [Replit Database client](https://github.com/replit/database-node) to work:
```sh
REPLIT_DB_URL='https://kv.replit.com/v0/' npm start
```> Replace `` with the [Base64](https://wikipedia.org/wiki/Base64) encoded [JWT](https://wikipedia.org/wiki/JSON_Web_Token).
To get the `REPLIT_DB_URL`, create a Node.js [Replit](https://replit.com/) and execute in the `Console`:
```js
process.env.REPLIT_DB_URL;
```## License
[MIT](LICENSE)