Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Latest commit

 

History

History
55 lines (43 loc) · 1.25 KB

README.md

File metadata and controls

55 lines (43 loc) · 1.25 KB

me3 Backend

This is a serverless function, running on Netlify, that is used to deploy webpages to IPFS using web3.storage.

New site publishing flow

Content:

Setup

  1. Clone the project and switch to backend
    git clone https://github.com/me3-eth/backend.git me3-eth-backend
    cd me3-eth-backend
  2. Optional: set node version with NVM
    nvm use
  3. Install dependencies
    npm install
  4. Create environment file
    touch .env
  5. Fill in environment value with template and your data
    # Get an API key from https://www.alchemy.com/
    ALCHEMY_API_KEY=
    
    # Force node 14
    AWS_LAMBDA_JS_RUNTIME=nodejs14.x
    NODE_VERSION=14
    
    # Get an API key from https://web3.storage/
    WEB3_STORAGE_API_KEY=

Deploy

In production, the function is automatically built and deployed by Netlify on pushes to main.

On localhost, the function can be run in dev mode using Netlify Dev.

npm run dev