Skip to content

remarkablemark/Replit-URL-Shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replit URL Shortener

Run on Replit GitHub last commit License: MIT

Replit URL shortener. Read the blog post.

Prerequisites

Install

Clone repository:

git clone https://github.com/remarkablemark/Replit-URL-Shortener.git
cd Replit-URL-Shortener

Install dependencies:

npm install

Scripts

In the project directory, you can run:

npm start

Runs the app.

Open http://localhost:3000 to view it in the browser.

The environment variable REPLIT_DB_URL must be set for the Replit Database client to work:

REPLIT_DB_URL='https://kv.replit.com/v0/<your_base64_jwt>' npm start

Replace <your_base64_jwt> with the Base64 encoded JWT.

To get the REPLIT_DB_URL, create a Node.js Replit and execute in the Console:

process.env.REPLIT_DB_URL;

License

MIT