Code Monkey home page Code Monkey logo

store's Introduction

Create your own free unlimited cloud storage! Our tool uses GitHub-as-a-storage to save there the uploaded files. You can use our deployed tool or run it by yourself - see below for instructions.

How to deploy

Deploy to Heroku

TL;DR: you need to create a GitHub token and add it to deployed repo as GITHUB_TOKEN environment variable.

Or just watch a video:

Morejust storage installation demo

Step-by-step guide

1️⃣ Create GitHub token

  1. Register on GitHub and go to Settings -> Developer Settings -> Personal Access Tokens -> Generate new token
  2. Give it a random name, select public repo and scroll below and smash Generate. You don't have to add any additional rights if you want to store your files on public repositories.

3. Copy generated GitHub token and go to the next part: deployment.

2️⃣ Deploy to Heroku

Heroku allows to create free small machines and deploy from GitHub in one click. You will need to have a Heroku account to proceed, so please register.

  1. Press the button below to deploy with one click

Deploy to Heroku

  1. Choose any app name you like

  1. Click the 'Manage App' at the bottom of the page

  2. Click 'Settings' and 'Reveal Config Vars'

  3. Set the key to GITHUB_TOKEN and the value to the generated on the previous steps GitHub token.

  1. Smash 'Open app' and enjoy!

Run Client & Server locally

If you don't like . Heroku, you can deploy manually.

git clone https://github.com/morejust/store

Start server:

npm run dev

Start client:

cd client
npm start

All Environment Variables

Here is the list of all possible config variables that can be changed (except GITHUB_TOKEN that is required and was set earlier). If you decide to use this config variables, you should specify them as environment variables.

  1. BLOCK_SIZE_MB - max block (github repo) size. Default value = 1000
  2. MAX_FILE_SIZE_MB - max file size that can be uploaded. Default value = 100
  3. GITHUB_ORGANIZATION - used to create blocks in the organization Github account, not in your private account. Default value - not set.

Technical details

HEROKU DEPLOY

To use this heroku-deploy branch:

git checkout heroku-deploy
git fetch
git reset --hard origin/master
npm run build-front
git add client/build
git commit --allow-empty -m "build heroku"
git push --force
git checkout master

or simply

npm run deploy

How to use add_file.sh script

From any folder you can launch:

bash add_file.sh $NAME_OF_bLOCK_REPO $AbSOLUTE_PATH_TO_FILE

Keep in mind that you should have a push access to the repository. If you want to create a new repo for files (we call it 'block'), you should have the rights to create a new repo.

store's People

Contributors

caffeinum avatar ohld avatar github-gist-bot avatar kroschu avatar

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.