nearprotocol / near-fiddle-api

Micro-service to save/load fiddles for NEAR Studio

Home Page:https://studio.nearprotocol.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

near-fiddle-api

Build Status

Micro-service to save/load fiddles for NEAR Studio.

Environment Variables

This micro-service depends on the following environment variables:

  • APP_URL -- default https://app.near.ai;
  • CONTRACT_HELPER_URL -- default https://studio.nearprotocol.com/contract-api;
  • NODE_URL -- default https://studio.nearprotocol.com/devnet;
  • WALLET_URL -- default https://wallet.nearprotocol.com;

The above variables define the URLs used by the web apps from withing the browser so they should always correspond to public IP or DNS name.

  • NODE_ENV -- default production;
  • PORT -- default 3000;

Local Development

Requirements

  1. Install latest Node.js LTS release.
  2. Install postgres
brew install postgres

Run database

brew services start postgresql
createuser fiddle -W  # It'll ask for password, enter "fiddle"
createdb -O fiddle fiddle
createdb -O fiddle fiddle_test

Build and run the service

npm install
node app.js

About

Micro-service to save/load fiddles for NEAR Studio

https://studio.nearprotocol.com

License:MIT License


Languages

Language:JavaScript 89.0%Language:Shell 6.6%Language:Dockerfile 4.4%