Skip to content

ChrisMoralis/token-gate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moralis Token Gating Server

This server project is built using Express to demo Token Gating capabilities using Moralis SDK.

Getting Started

1. Install Dependencies

# Using NPM
npm i

# Using Yarn
yarn

2. Add Environment Variables

Copy .env.example file and rename it .env, then fill in the following info with your Moralis server details.

MORALIS_APP_ID=xxx
MORALIS_SERVER_URL=xxx
MORALIS_MASTER_KEY=xxx

3. Run Server

# Using NPM
npm run start

# Using Yarn
yarn start

4. Call Secret API

You can use any method to call the /secret REST API. Here is an example using CURL.

curl http://localhost:3000/secret \
    -H 'Content-Type: application/json' \
    -d '{"sessionToken":"<session-token-input>"}'

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published