DEV Community

Abhishek Keshri
Abhishek Keshri

Posted on

Web Rewrite - a URL Shortener built with Node and AppWrite

Web Rewrite

web-rewrite screenshot

web-rewrite is a utility that allows you to rewrite your URLs.

I wanted to write my own url shortener and then came accross appwrite, which motivated me enough to do it.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of node, appwrite
  • web-rewrite needs the following env vars to function correctly ```bash

HOST=appwrite-console-host
APPWRITE_PORT=80 #Port where appwrite console is running
PROJECT_ID=project-id-from-appwrite-console
API_KEY=api-key-from-appwrite-console
APP_PORT=4321 # The port where you want web-rewrite to run
LINKS_COLLECTION_ID=links-collection-id1 #Try changing this if setup fails


#### Getting web-rewrite

To install web-rewrite, follow these steps:

```bash


git clone https://github.com/2kabhishek/web-rewrite
cd web-rewrite
touch .env 
npm run setup # Sets up the links collection in appwrite
npm start


Enter fullscreen mode Exit fullscreen mode

Using web-rewrite

After starting the app you can visit the app through your browser.

How it was built

web-rewrite was built using node, express and appwrite

Challenges faced

While building web-rewrite the main challenges were:

  • Setting up AppWrite collections through node was tricky

What I learned

  • AppWrite and it's different services, will use it more in upcoming projects
  • Web routing

What's next

May deploy it somewhere soon

Submission Category:

Web2 Wizards

Link to Code

GitHub logo 2KAbhishek / web-rewrite

Rewrite you URLs ๐ŸŒโœ๏ธ

License People Stars Forks Watches Last Updated

Rewrite you URLs ๐ŸŒโœ๏ธ

web-rewrite Demo
web-rewrite screenshot

What is this

web-rewrite is a utility that allows you to rewrite your URLs.

Inspiration

I wanted to write my own url shortener and then came accross appwrite, which motivated me enough to do it.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of node, appwrite
  • web-rewrite needs the following env vars to function correctly
HOST=appwrite-console-host
APPWRITE_PORT=80 #Port where appwrite console is running
PROJECT_ID=project-id-from-appwrite-console
API_KEY=api-key-from-appwrite-console
APP_PORT=4321 # The port where you want web-rewrite to run
LINKS_COLLECTION_ID=links-collection-id1 #Try changing this if setup fails
Enter fullscreen mode Exit fullscreen mode

Getting web-rewrite

To install web-rewrite, follow these steps:

git clone https://github.com/2kabhishek/web-rewrite
cd web-rewrite
touch .env
npm run setup # Sets up the links collection in appwrite
npm start
Enter fullscreen mode Exit fullscreen mode

Using web-rewrite

After starting the app you can visit the app through your browser.

How it was built

web-rewrite was builtโ€ฆ

Top comments (0)