Skip to content

🖼️ Serverless API implementation for PancakeSwap Profile contract

License

Notifications You must be signed in to change notification settings

chef-huan/pancake-profile-api

This branch is 23 commits behind pancakeswap/pancake-profile-api:develop.

Folders and files

NameName
Last commit message
Last commit date
Dec 10, 2021
Jul 27, 2021
Dec 22, 2021
Jul 27, 2021
Dec 13, 2021
Jan 20, 2021
Apr 1, 2021
Jan 20, 2021
Jan 25, 2021
Jul 27, 2021
Jul 27, 2021
May 27, 2021
Sep 8, 2021
Jul 27, 2021
Jun 30, 2021
Sep 21, 2021

Repository files navigation

PancakeSwap Profile API

Serverless API implementation for PancakeSwap Profile contract

Dependencies

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

Documentation

Documentation is available here.

Configuration

1. Database

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

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

2. Blacklist

You can configure (create/update/delete) the blacklist by editing the file located here.

Note: All blacklisted words must be LOWERCASE.

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 Profile contract

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%