JSHan94 / api

πŸ’» Backend API Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ’» Duckee API

This is API server implementation of Duckee, an generative art exchange platform on Solana.

Getting Started

Prerequisites

  • Node.JS >= 16 or higher
  • pnpm Package Manager

Setting Up Dependencies

Duckee API uses pnpm as dependency manager. Before installing use corepack to activate it:

 $ corepack enable  # this installs pnpm
 $ pnpm install

Configuring API

You need to prepare the configuration as environment variables. For details, please refer to src/config.ts. We recommend setting up .env file with autoenv:

 $ cat .env.local
 DB_HOST=localhost:3306
 DB_USER=duckee
 ADMIN_PRIVATE_KEY=...

Private keys are in JSON array format (Unencrypted Solana keypair). You can easily generate it with solana-keygen:

$ solana-keygen new
$ export ADMIN_PRIVATE_KEY=`cat ~/.config/solana/id.json`

Deploying API

We use AWS Lambda for deploying API. If you want to deploy in your own AWS account, please refer to serverless.yml for details.

About

πŸ’» Backend API Server


Languages

Language:TypeScript 96.5%Language:JavaScript 2.3%Language:Handlebars 1.3%