levintech / pancake-nft-api

Serverless API implementation for PancakeSwap NFT Marketplace contract

Home Page:https://nft.pancakeswap.com/api/version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PancakeSwap NFT Marketplace API

Serverless API implementation for PancakeSwap NFT Marketplace

Dependencies

  • Vercel CLI
    • Required to emulate local environment (serverless).

Configuration

1. Database

You can configure your database URI for any development purpose by exporting an environment variable.

# Default: mongodb://localhost:27017/marketplace
export MONGO_URI = "mongodb://host:port/database";

Development

Install requirements

yarn global add vercel

Build

# Install dependencies
yarn

# Build project
vercel dev

Endpoints are based on filename inside the api/ folder.

# api/version.ts
curl -X GET 'localhost:3000/api/version'

# ...

Production

Deploy

Deploy to production should be triggered by a webhook when a commit, or a pull-request is merged to master.

If you need to force a deployment, use the following command:

vercel --prod

About

Serverless API implementation for PancakeSwap NFT Marketplace contract

https://nft.pancakeswap.com/api/version

License:GNU General Public License v3.0


Languages

Language:TypeScript 99.6%Language:Shell 0.4%