Axel1672
@Axel1672
Cannot get / error
I am using express
ch1ck3n add this on line 48
app.get('/', function (req, res) {
res.send('hello world');
});
`2 years ago
Failed to connect, retrying. Help me please
Coder100 Please, wait patiently. Large projects take some time to load, but you can also try forking the repl and clicking the get help button.2 years ago
How to save data in node.js?
(50 charsssssssssssssss)
Coder100 there's multiple ways to do it, the easiest is replit db
https://docs.replit.com/misc/database2 years ago
ruiwenge2 you can use the replit database, like this:
const Database = require("@replit/database");
const db = new Database();
db.set("number", 2).then(() => console.log("saved"));
hope this helps!2 years ago
I cant ping a repl project in UptimeRobot
When I press add new monitor and put the repl url it says: Not Found (404)
How to change environment variables value?
in node.js
InvisibleOne You can only read env's, not write them (at least not to my knowledge, although there is a way in python I think)2 years ago
const express = require("express")
const app = new express()
const fetch = require("node-fetch")
const groupId = process.env.groupId
app.get("/groupm
Coder100 You named the fetch called res, so you need to change the variable, here is correct code:
const express = require("express")
const app = new express()
const fetch = require("node-fetch")
const groupId = process.env.groupId
app.get("/groupmembers/:id", (req, res) => {
var Key = req.params.id
if (Key === process.env.key) {
fetch('https://groups.rprxy.xyz/v1/groups/' + groupId).then(r => r.json()).then(r => {
const groupMembers = r.memberCount;
res.send(groupMembers);
})
2 years ago
var verifSent = 0;
var retryCounter = 1;
client.on('message', (message) => {
if (message.content.toLowerCase() === Prefix + 'verify' && verifSent
client.on('message', (message) => {
var verifSent = 0;
if (message.content.toLowerCase() === Prefix + 'verify' && verifSent == 1) {
message.ch
AloeBest You set it to 0 everytime the client sees a message, to prevent this, move the variable outside of the client.on('message'... part.2 years ago
npm start
> [email protected] start /home/runner/Reblex-renking-epi-newi-1
> node server.js
internal/modules/cjs/loader.js:638
throw err;
RYANTADIPARTHI There's a module that you are importing which is either not there or not available in repl.it2 years ago
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'noblox.js'
at Function.Module._resolveFilename (internal/modul
RYANTADIPARTHI It is module error. Whatever module you are importing is giving the error. You might want to remove that.2 years ago
unable to run, main file "main.sh" not found
How can I correct that error in red and why does it appear?