Code Monkey home page Code Monkey logo

api-secure-short's Introduction

api-secure-short

This repository contains the backend code for the secure-short application. The secure-short application is a tool for generating short links that can be password protected or not.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Before you begin, make sure you have the following software installed on your computer:

  • Git
  • Node.js
  • npm

Installation

Follow these steps to set up the project on your local machine:

  1. Clone the repository to your local machine:
git clone https://github.com/<your_username>/api-secure-short.git
  1. Change into the repository directory:
cd api-secure-short
  1. Install the required packages:
npm install
  1. Start the development server:
npm start

The backend should now be running on http://localhost:3000.

API Endpoints

The following endpoints are available in the API:

  • GET /links: Retrieve a list of all links generated by the application.
  • POST /links: Create a new link. The request body should contain the following parameters:
    • url: The original URL that the short link should redirect to.
    • password (optional): A password that should be required to access the short link.
  • GET /links/:id: Retrieve information about a specific link, specified by its id.
  • PUT /links/:id: Update a specific link, specified by its id. The request body should contain the parameters that should be updated.
  • DELETE /links/:id: Delete a specific link, specified by its id.

Built With

  • Node.js - The backend framework used.
  • Express.js - The web framework used for building the API.
  • MongoDB - The database used for storing the links.

Contributing

If you're interested in contributing to the project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make the changes and commits.
  4. Push the changes to your fork.
  5. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.