Coder Social home page Coder Social logo

weipfs's Introduction

WeIPFS

An IPFS API server for processing file uploads to a localy hosted IPFS node. This can be used with the WeYouMe Application to facilitate image uploading on the endpoint ipfs.yourdomain.com/upload

Setup:

  1. Extract the repository to your server and create the data storage directories.
    git clone https://github.com/weyoume/weipfs
    mkdir /data/ipfs
    mkdir /data/staging
    
  2. Host a local IPFS node using the startipfs.sh script. This will create a dockerized node with required ports forwarded.
  3. Point your server's nginx.conf file (or apache equivalent) to the endpoints at:
    1. ipfs.yourdomain.com/ipfs -> port 8080 // This is the IPFS Gateway for viewing files using your node.
    2. ipfs.yourdomain.com/upload -> port 4000 // This is the port used by this API for handling file uploads.
    3. ipfs.yourdomain.com/ -> port 5001 // This is the port used by the IPFS API for pinning files to your node.
  4. Ensure that you have added an entry into your nginx.conf file to handle image requests larger than 1MB. Without this entry, you will encounter the error: 413 Request Entity Too Large
    server {
        client_max_body_size 100M;
        ...
    }
  1. Ensure that your server's ports (typically in your VPS security group settings) are open on values of 8080, 4000 and 5001.
  2. Ensure that your IPFS node has its CORS settings open to requests:
docker exec ipfs_host ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '["*"]'
docker exec ipfs_host ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST", "GET"]'
  1. Ensure that you have installed Yarn, and GraphicsMagick on your server ( substitute apt-get for your desired package manager i.e. yum , brew ), and then run the deployment script:
apt-get update
apt-get install -y graphicsmagick
npm install yarn
yarn install --non-interactive --frozen-lockfile
yarn deploy

Learn more at:

IPFS README: https://ipfs.weyoume.io/ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

WeYouMe Whitepaper: https://ipfs.weyoume.io/ipfs/QmacFgC3osnZS2oAAkV5cDXaHBkifZo2JjXkB2X52TUPwA

weipfs's People

Contributors

sekhmet avatar harrisonmclean avatar nothingismagick avatar

Watchers

James Cloos 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.