Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pancakeswap/pancake-profile-api
:framed_picture: Serverless API implementation for PancakeSwap Profile contract
https://github.com/pancakeswap/pancake-profile-api
api pancakeswap profile
Last synced: 5 days ago
JSON representation
:framed_picture: Serverless API implementation for PancakeSwap Profile contract
- Host: GitHub
- URL: https://github.com/pancakeswap/pancake-profile-api
- Owner: pancakeswap
- License: gpl-3.0
- Created: 2021-01-20T09:44:23.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2023-03-05T21:01:05.000Z (over 1 year ago)
- Last Synced: 2024-04-14T01:55:12.825Z (7 months ago)
- Topics: api, pancakeswap, profile
- Language: TypeScript
- Homepage: https://profile.pancakeswap.com/api
- Size: 772 KB
- Stars: 32
- Watchers: 1
- Forks: 55
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# PancakeSwap Profile API
Serverless API implementation for PancakeSwap Profile contract
# Dependencies
- [Vercel CLI](https://vercel.com/download)
- Required to emulate local environment (serverless).# Documentation
Documentation is available [here](docs/README.md).
# Configuration
# 1. Database
You can configure your database URI for any development purpose by exporting an environment variable.
```shell
# 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](utils/blacklist.json).
> Note: All blacklisted words must be LOWERCASE.
# Development
## Install requirements
```shell
yarn global add vercel
```## Build
```shell
# Install dependencies
yarn# Build project
vercel dev
```Endpoints are based on filename inside the `api/` folder.
```shell
# 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:
```shell
vercel --prod
```