/FileShare

This web app, also an API lets users upload files and generates a link to share them. The generated links can be password protected.

Primary LanguageJavaScriptMIT LicenseMIT

FileShare App CI

This NodeJS app let't you upload files and generate a link to download them. The generated links can be password protected as well.

Setting up the app locally.

Prerequisites

  • NodeJS v16.x
  • MongoDB v5.x Windows | Mac
  • MongoDB Compass(optional)
  • tinyurl.com API key for shortening url links.
  1. Install dependencies:
npm install
  1. Run the app in devlopment environment:
  • cd configs
  • create dev.env file in the configs folder with the following content: touch dev.env
NODE_ENV=development
MONGODB_LOCAL_URI=mongodb://localhost:27017/filesDB
ACCESS_TOKEN=<your tinyurl api token>
UPLOAD_PIN=<UPLOAD PIN SECRET OF YOUR CHOICE>
SIGN_COOKIE=<ANY SECRET KEY OF YOUR CHOICE>
  1. Make sure your mongoDB is running and accessible from your local machine.
  2. Finally start the app
npm run devstart

Running test cases

  1. Install dependencies:
npm install
  1. Make sure your mongoDB is running and accessible from your local machine.
  2. Finally start the tests
npm run test

Production api documentation

Contributing