Poop Poop
@Squirrel777
Leaving repl.it. More Info: https://Leaving-Replit.squirrel777.repl.co. I will still be creating a few repl's though every now and then.
0
I was just working on an admin board for my Discord bot and I was using Vue.js for my project. When I tried to link my CSS file to fix some thing's, I
So I have made a website and it looks REALLY BAD because I made it. So I was looking for a certain website template that looks like this with a smooth
So I have made a website and it looks REALLY BAD because I made it. So I was looking for a certain website template that looks like this with a smooth
[VS code] Node.JS raises the error cannot lookup view "index" in views directory "views" depending on the current directory in the shell
So I have be
EpicGamer007 wait, i think views is set to path.join(__dirname, "views") by default, so i think setting views to views is messing something up2 years ago
I have not coded anything for a month and I REALLY want to code something with NodeJS. Don't just say "hAngMAn gAmE" or "quIz". I want to code somethi
EpicGamer007 make a discord bot but have an option where you can sign in with discord and manage yoru servers bot. you know how sometimes, for configuring bots, you write a bunch of commands to configure it? Instead of that, let the user sign in to a site, and then configure it from there. good luck ;) (i am not sure how you would use fs in this but you should be able to use everything else)2 years ago
So I was thinking of migrating my code over to visual studio code. Because repl.it hacker plan costs money and I don't like paying money when you can
SixBeeps tl;dresearch
Port-forward your router so that the public can access your server through your public IP
Add an A record (routes an IP to a domain name), put your public IP into the record contents
Freenom KnowledgeBase Article on adding records: https://my.freenom.com/knowledgebase.php?action=displayarticle&id=332 years ago
So I just realized that I have been on repl.it for somewhere around year. Now if you investigate you might see that my account was NOT created over a
HTML, CSS, JS
So basically I have almost everything resolved! That problem from yesterday? Solved! Which is good, but... what's that? Another permissions error! Oh
So basically I have almost everything resolved! That problem from yesterday? Solved! Which is good, but... what's that? Another permissions error! Oh
Ok, all these permission errors are driving me crazy! So I am using vs code and when I tried to execute my code, this happened:
internal/fs/utils.js:3
programmeruser Are you using Windows or Linux? From what I can guess you are using Linux, try giving it executable permissions with chmod +x /home/myName/path/to/my/project. (also, don't you usually use Windows?)2 years ago
So I have been making a Discord bot and it has some commands. You know how in Minecraft when you type a command lets say /tp @s ~ ~ ~. It executes the
Ok so yesterday I asked on how .gitignore files work. So I made a .gitignore on my playground repl to test out the feature. But for some reason one of
Node.js
IAmNew1234 مَا شَاءَ ٱللَّٰ
(Masha'Allah)
Masha'Allah, is an Arabic phrase that is used to express appreciation, joy, praise, or thankfulness for an event or person that was just mentioned. It is also a common expression used in the Muslim world to wish for God's protection of something or someone from the evil eye.
idk why i am commenting this2 years ago
SameeraMurthy Problem
You can't ignore already committed files.
Solution
You can delete ignore.js in your GitHub repo, and in the repl try making some changes to the code, and commit + push again. It should be ignored.2 years ago
So I have a repo that I want to publish, and it has some sensitive data. So I learned about .gitignore! However, I am a bit confused on how you ignore
RYANTADIPARTHI
Solution
it basically tells the Git which files to ignore, and which to not ignore. Each new line that is added creates new files/folders for it to see if it's important or not.
that's it.2 years ago
Coder100 It is the file name.
To match only extension, it would be:
*.json
A few more examples:
folder/
excludes the folder.
folder/*/
excludes all inside the folder.
name.json
what do you think
*.js
all js files in the root
`2 years ago
SameeraMurthy .gitignore is an awesome file that lets you stop sensitive data getting pushed to Git.
In the tutorial you saw, .file was just a file without the extention. (a dotfile.)
For example, if you want to ignore key.json, then you would put this in your .gitignore
key.json
If you want to ignore multiple files/folders you can do:
key.json
folder_name/
file_name.txt
`2 years ago
So I have been developing an API and I was wondering how it can get POST request's. Like if a user want's to submit data to the API, how can the user
Kudos #1: Import express
#2: Listen on a port such as 8080 or 3000
#3: Make a post request handler as follows:
app.post(/* Example route */ "/", (req,res) => {
console.log("post request recieved!")
res.send()
})
You can use the bodyParser module if you want to get the data a user sends. Here's a full example:
// Import required modules
const express = require("express");
const app = express();
// Use the body-parser middleware to access data sent by user
const bp = require("body-parser");
app.use(bp.u2 years ago
So I have been working on a few repl's for like the past month, and I have a question, first I am trying to make a download page. So first it refreshe
19wintersp Why exactly do you need to refresh the page before downloading the content? This is a bit of an XY problem, if you explain the reason you want to do this, we might be able to find a better solution. If you need to store the state between the reloads, use sessionStorage.2 years ago
tussiez Possible Solution
LocalStorage?
function doWork(){
if(localStorage.refreshed == false){
localStorage.refreshed = true;
window.location.reload();
} else {
localStorage.refreshed = false;
document.getElementById('downloadImage').src = 'images/image.png';
}
}
`2 years ago
Coder100 The thing is when you refresh the page that is like the user refreshing the page
tbh what do you expect
refresh is like a return statement, will not work.
Maybe make a redirect to some other page that auto-starts some installation2 years ago
I have asked this so many times without an answer. How can I save a user response as a variable? So I have this code:
var data = ''
app.post('/form',
19wintersp What happens in your code:
Set data to ''
When a POST to /form is received, set data to req.body.someData
Console log data, which is ''
Then later, when the request is received, data is duly set.
Your user response is saved, just you never get it output. If you move the console.log to inside the callback, you will get your expected behaviour.2 years ago
realTronsi I don't understand why globals "won't work due to the parentheses"
Could you show an example?2 years ago
Ok so in the firebase console you all know that you can make a folder manually through the console.
screenshot_LI
And that is the only way I know. I
Zavexeon Have you tried setting the upload path to something like myfolder/file? I know with Firestore it'll automatically make a collection if it doesn't exist, so maybe the same thing with Storage?
The docs seem pretty skimpy on the Storage part.2 years ago
Ok so first of all overflow is set to scroll! I have no idea why, but I cant scroll on my website. Basically all it does is show you the temperature a
HTML, CSS, JS
19wintersp What's wrong?
.w3-top is position: fixed: it will not scroll, it is positioned relative to the screen, rather than the content. Anything inside of it will be positioned relative to the screen: useful for a navigation pinned to the top, not-so-useful for content.
How do I fix this?
You're missing a ` tag to end .w3-top; your content is being placed in your navigation container. Put another ` after line 39.
PS: generally, use overflow: auto over overflow: scroll; they are identical except auto2 years ago
So I am making a review page for my website and pretty much everything is done except for the fact that you cant see other reviews. I am using a for l
Coder100 well I just want to say what you are doing is slightly wrong. First, why are you defining a function inside a loop?
db.collection('Posts').get().then(async snap => {
for (var i = 1; i<snap.size + 1; i++) {
var docc = 'id' + i;
const ref = db.collection('Posts').doc(docc);
const doc = await ref.get();
app.get("/", function(req, res) {
res.render("index", {
responses: doc.data()['Title'] + " " + doc.data()['Description'] + doc.data()['rating']
});
});
}
});
and secon2 years ago