Skip to content
Micro-service to save/load fiddles for NEAR Studio
JavaScript Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
models
scripts
test
.dockerignore
.eslintrc.yml
.gitignore
.gitlab-ci.yml
.travis.yml
Dockerfile
LICENSE
README.md
app.js
build_image.sh
package.json
run_prod.sh
yarn.lock

README.md

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
You can’t perform that action at this time.