This server project is built using Express to demo Token Gating capabilities using Moralis SDK.
# Using NPM
npm i
# Using Yarn
yarn
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
# Using NPM
npm run start
# Using Yarn
yarn start
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>"}'