This is a serverless function, running on Netlify, that is used to deploy webpages to IPFS using web3.storage.
Content:
- Clone the project and switch to backend
git clone https://github.com/me3-eth/backend.git me3-eth-backend cd me3-eth-backend
- Optional: set node version with NVM
nvm use
- Install dependencies
npm install
- Create environment file
touch .env
- 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=
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