SNIP is a backend server for a URL shortener application. It's built using Express.js and Node.js, with MongoDB as the NoSQL database. Users can submit a title and URL to create short links. Hosted on Railway.
Client: Next.js, TailwindCSS
Server: Node.js, Express.js
Database: MongoDB
Highlight: Used SSR, CSR, NextAuth (Google)
POST /url
Body | Type | Description |
---|---|---|
title |
string |
Required. A title related to url |
url |
string |
Required. Url |
GET /url/:shortId
Parameter | Type | Description |
---|---|---|
shortId |
string |
Required. short id created after Post |
GET /url/analytics/:shortId
Parameter | Type | Description |
---|---|---|
shortId |
string |
Required. short id created after Post |
GET /url/all-urls/:id
Parameter | Type | Description |
---|---|---|
:id |
string |
Required. Id of logged in user |
Clone the project
git clone https://github.com/aakashvani/snip-server.git
Install dependencies
npm install
Start the server
npm run start