Skip to content
Sign UpLog In
Profile icon

Axel1672

@Axel1672
Repls
Community
Axel1672
Axel1672
shared a Post
2 years ago
Cannot get / error
Cannot get / error I am using express
ch1ck3n
ch1ck3n
add this on line 48 app.get('/', function (req, res) { res.send('hello world'); }); `2 years ago
Axel1672
Axel1672
shared a Post
2 years ago
Failed to connect, retrying. Help me please
Coder100
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
Axel1672
Axel1672
shared a Post
2 years ago
How to save data in node.js? (50 charsssssssssssssss)
Coder100
Coder100
there's multiple ways to do it, the easiest is replit db https://docs.replit.com/misc/database2 years ago
ruiwenge2
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
Axel1672
Axel1672
shared a Post
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)
Coder100
Coder100
send the repl url2 years ago
Axel1672
Axel1672
shared a Post
2 years ago
How to change environment variables value? in node.js
InvisibleOne
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
Axel1672
Axel1672
shared a Post
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
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
Axel1672
Axel1672
shared a Post
2 years ago
var verifSent = 0; var retryCounter = 1; client.on('message', (message) => { if (message.content.toLowerCase() === Prefix + 'verify' && verifSent
Axel1672
Axel1672
shared a Post
2 years ago
client.on('message', (message) => { var verifSent = 0; if (message.content.toLowerCase() === Prefix + 'verify' && verifSent == 1) { message.ch
AloeBest
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
R2D2VaderBeef
R2D2VaderBeef
I think its because you set it to 0 every time a message is received.2 years ago
Axel1672
Axel1672
shared a Post
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
RYANTADIPARTHI
There's a module that you are importing which is either not there or not available in repl.it2 years ago
Axel1672
Axel1672
shared a Post
2 years ago
internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'noblox.js' at Function.Module._resolveFilename (internal/modul
RYANTADIPARTHI
RYANTADIPARTHI
It is module error. Whatever module you are importing is giving the error. You might want to remove that.2 years ago
Coder100
Coder100
oh wait nvm change your .replit file to: run="npm i ; npm start" `2 years ago
Coder100
Coder100
send repl2 years ago
Axel1672
Axel1672
shared a Post
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?
rameshdonga
rameshdonga
unable to run, main file "Main.java" not found11 months ago
diloga
diloga
why11 months ago
Coder100
Coder100
Create a .replit file. Inside, put: run="npm start" `2 years ago