How to make a cloud variable server?

Does anyone know how to make a cloud variable server for snap?

(with replit)

const express = require('express');
const app = express();
const cors = require('cors');
const ReplitDBClient = require('replitdb-client');
const client = new ReplitDBClient();
app.use((req, res, next) => {
  const chunks = [];
  req.on('data', chunk => chunks.push(chunk));
  req.on('end', () => {
    req.body = Buffer.concat(chunks).toString();
app.get('/get', async (req, res) => {
  const value = await client.get(, { raw: true });
});'/set', async (req, res) => {
  await client.set(, req.body);
app.listen(8080, () => {
  console.log('Listening on port 8080');

Ok, whats the snap code to go with that?

(the code for sending a request to the server)

untitled script pic
untitled script pic (1)

thanks :slightly_smiling_face:

do I need to hit always on?

If you have the hacker plan, then yes.
If you don't have the hacker plan use UpTimeRobot.

ok, how do I close a topic?


Set the category to help with Snap!, select a correct answer, then switch back to advanced help :slight_smile:

ONE THING! I dont see a GET url block

File icon > Libraries > HTTPS blocks

WHAT is a library

I updated my comment if it wasn't clear enough.

const value = await client.get(, { raw: true });

SyntaxError: await is only valid in async function



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.