I know you can't create cloud variables in Snap, but I know people who have. So, in this case, since it is technically unsafe to use others servers, how do you create your own?
If you search for it on the forum, you'll find a few tutorials.
Here's one
const express = require('express');
const app = express();
const cors = require('cors');
app.use(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();
next();
});
});
app.get('/get', async (req, res) => {
const value = await client.get(req.params.name, { raw: true });
res.sen…
system
Closed
April 14, 2023, 1:35am
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.