How do I connect Webste <-> Server <-> Database❓
Github code for Main website in public and server.js https://github.com/Lanonymus/todowebsite/tree/main
GitHub
GitHub - Lanonymus/todowebsite
Contribute to Lanonymus/todowebsite development by creating an account on GitHub.
110 Replies
Project ID:
413a7dad-c2ce-4187-8822-4c592f0b177c
You are missing a package.json and a package-lock.json
Alright
I dowloanded them
what do I put now in this box
your last github commit has you hardcoding the database credentials, please revert that commit.
where are your package.json and package-lock.json files in github?
nothing, it does not need to be filled if you correctly setup your project
Dont I have to keep them as a secret variables?
yes, so revert that commit
OH
I thought I hide them
and also they are wrong ones lol
where Do I revert
i think you should check out the github docs for that question
oh well
where are your package.json and package-lock.json files in github?
Alright
Changed Credentials and added packages-json
how does it look now
where is the package-lock.json?
um
Well
I need to add it by using this command right in terminal ? :
you would need to do that for all the deps your code uses
I would have to dowloand every dependancy separately?
you can specify multiple deps in a single command
you mean npm install x y z etc?
const express = require('express');
const session = require('express-session');
in this case express and the second one
you use more than just those two packages, but you got the idea
alright
Is it supposed to be taking this long?
lol i dont know, do you have fast internet
a decent I'd say
oof 250ms under load
yeah well ...
It not bad right
?..
faster than mine
bro I think it paused
it ain't movin
run it again
alr lets see
It may be caused of my grandpa using dowloanding some suspicious viruses online
but that's another thread
nope thats not another thread lol
Bro I think my dog is eating the router cables
or at least having them arleady straved
let me know when you have a package.json and a package-lock.json file in your repo
aLr
Okay so I added those packages: https://github.com/Lanonymus/ToDoWebsite
GitHub
GitHub - Lanonymus/ToDoWebsite: My First official full-stack project.
My First official full-stack project. Contribute to Lanonymus/ToDoWebsite development by creating an account on GitHub.
should be good now
what do you think
let me take a look
those two files look good, you will now need to make a slight change to line 10 of server.js, for that change, please read this docs page - https://docs.railway.app/guides/fixing-common-errors
It cannot find module express
do I have to put node_modules in the github?
@Brody
no
why railway cant find module express then
build logs please - https://bookmarklets.up.railway.app/log-downloader/
it doesnt do anything
please follow the instructions
I did
you didn't
???
what am I supposed to do
follow the 3 simple instructions please
let me know when you have the build logs
what are the
bro I am doing this first time
Like what even is bookmarklet
sounds like a book mouse
from 2013 facebook
💀
NaHHH
tHAT's wild
why would a YouTube search be helpful?
I dont have the marklet bar
💀
then enable it
???
Okay I did add it and run it
but it says this
do you have a deployment open?
okay I did open it
here are the logs
I asked for the build logs
they are empty
do another deployment then
here they are
why does the deployment say 10 days ago
are you deploying from the wrong GitHub repo
well
Oh wait
I think I know hwy
why
am stupid xdd
I didin't connect github
Now it should be fine
those are the exact same build logs you have previously sent
no
It has 6 more lines
it a bit diffrent
Now I get success
🥳
I mean
kinnda succes
xdd
^
I am doing something wrong?
yes you did, please read the docs page I linked
aLright
I think I fixed it
how does it look now
still wrong, please do not skim read the docs page I linked
bruuuu
You meant this , Didin't you?
nope, again do no skim read that docs page
I dont have a PORT variable defined automaticly
please do not skim read that
???
automatically injected is the key words here
oh so you mean
That I dont have to define it
and I can just say PORT
in the code
the docs even tell you not to define it
in the future please read documentation more carefully
okay I think
I corrected all those goofy errors
lets see if it works
Oh MA gAT
IT WORKING
yOOOOOOOOooooooooooooooooooooooooooooOOOOOOOOOOO
No Freaking way
https://todowebsite-production.up.railway.app/index.html
@Brody can u test it out ?
and give it Rate ⭐ ??
1/10
that's better then 0