morfeusys / lametric-deta-js-backend

Free public NodeJS backend for your Lametric Time application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lametric Deta JS backend

This repository provides a quick way to create a free public NodeJS backend on Deta for Lametric Time application development.

Why Deta

Deta greatly satisfies Lametric developers' needs providing a free-forever cloud for NodeJS and Python micro servers with built-in persistence layer and 10GB filesystem.

How to start

  1. Create an account on Deta and install Deta CLI on your machine.

  2. Click the "Deploy to Deta" button below to deploy this templated server on free Deta cloud.

Deploy

  1. Once deployed, run deta clone --name <your deployed micro name> --project <your project name> to clone sources to your machine.

  2. Create a new Lametric Time indicator app and pass a URL of your Deta micro appended with /poll suffix.

For example, if your Deta URL is https://qqq.deta.dev/, set URL as https://qqq.deta.dev/poll in "URL to get data from" field.

Please read more about how to create Lametric Time apps here.

How to make changes

Once you've edited sources and would like to deploy it to Deta, just run deta deploy from the project's directory.

How to develop locally

  1. Obtain your Deta project key from Deta dashboard and pass it to the DETA_PROJECT_KEY environment variable.
  2. Run npm i and node index.js to download dependencies and start server on local port 8000.
  3. Install Ngrok and run ngrok http 8000 to create a public URL for your local server.
  4. Pass public URL to Lametric Time app settings ending with /poll for polling URL and /button for button action.

This enables to receive HTTP requests from your Lametric app and debug it during the development process.

About

Free public NodeJS backend for your Lametric Time application


Languages

Language:JavaScript 100.0%