Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/autumnchris/url-shortener-api
An Express.js API that takes a submitted URL and creates an alias URL that, if navigated to, will redirect to the original URL.
https://github.com/autumnchris/url-shortener-api
api css3 ejs ejs-express express expressjs freecodecamp javascript mongodb mongoose mongoosejs nodejs url-shortener
Last synced: about 2 months ago
JSON representation
An Express.js API that takes a submitted URL and creates an alias URL that, if navigated to, will redirect to the original URL.
- Host: GitHub
- URL: https://github.com/autumnchris/url-shortener-api
- Owner: autumnchris
- Created: 2018-10-08T22:31:56.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-04-15T23:04:01.000Z (over 1 year ago)
- Last Synced: 2024-07-08T18:52:14.733Z (6 months ago)
- Topics: api, css3, ejs, ejs-express, express, expressjs, freecodecamp, javascript, mongodb, mongoose, mongoosejs, nodejs, url-shortener
- Language: CSS
- Homepage: https://autumnchris-url-shortener-api.onrender.com/api
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL Shortener API
An Express.js API that takes a submitted URL and creates an alias URL that, if navigated to, will redirect to the original URL.
Inspired by the [URL Shortener Microservice challenge](https://learn.freecodecamp.org/apis-and-microservices/apis-and-microservices-projects/url-shortener-microservice) as part of the curriculum for the [APIs and Microservices Certification](https://www.freecodecamp.org/learn/apis-and-microservices) on [freeCodeCamp](https://www.freecodecamp.org).
---
## Built With
* [Express.js](https://expressjs.com)
* [Mongoose](https://mongoosejs.com)
* [MongoDB](https://www.mongodb.com)
* [EJS](https://ejs.co)
* CSS3
* JavaScript
* [randomstring](https://github.com/klughammer/node-randomstring)
* [valid-url](https://github.com/ogt/valid-url)
* [dotenv](https://github.com/motdotla/dotenv)
* [Normalize.css](https://necolas.github.io/normalize.css)
* [Google Fonts](https://fonts.google.com)
* [FontAwesome](https://fontawesome.com)
* [nodemon](https://nodemon.io)## Demo
View project demo at [https://autumnchris-url-shortener-api.onrender.com/api](https://autumnchris-url-shortener-api.onrender.com/api).
## Instructions
After forking and cloning, navigate to the repository in your command line and install the NPM packages:
```
npm install
```Create a `.env` file in the root of the repository and add the following environment variables:
```
MONGO_URI=
```Run the following script in your command line if starting the repository in development mode:
```
npm run dev
```Run the following script in your command line if starting the repository in production mode:
```
npm start
```Once the server is running, go to `http://localhost:3000` in your browser.