Need assistance with hosting JS-web project
Hello, im trying to host an Assistants discord bot Dashboard.
I need help with deploying and domain installing
Solution:Jump to solution
don't put tokens of any kind on code, use service variables
https://docs.railway.app/develop/variables
add the missing fields to the package.json, you could find the missing fields online or from doing
npm init
in another folder, and looking at the newly created package.json...81 Replies
Project ID:
e5992fe2-93c8-4531-949c-97634b766726
please share your repo
One second
GitHub
GitHub - Ruddien/DashBoard
Contribute to Ruddien/DashBoard development by creating an account on GitHub.
that's not a valid package.json
Im using example package.json.
xxx - just for not sharing my tokens to public
If it`s wrong, what should i do?
Solution
don't put tokens of any kind on code, use service variables
https://docs.railway.app/develop/variables
add the missing fields to the package.json, you could find the missing fields online or from doing
npm init
in another folder, and looking at the newly created package.jsonI searched for a variables, and how i should paste they in the code?
![No description](https://cdn.answeroverflow.com/1170436428623249438/image.png)
In what form?
For example, that one
![No description](https://cdn.answeroverflow.com/1170436689160843426/image.png)
Sry for dumb q
please read the docs page I linked, if you for instance had a discord token, you would set a service variable
DISCORD_TOKEN
to your discord token, then in JavaScript you access that service variables by using process.env.DISCORD_TOKEN
the variable you show me here is already automatically set for you, to access it just use process.env.RAILWAY_PUBLIC_DOMAIN
in your codeThat way?
![No description](https://cdn.answeroverflow.com/1170437151440257084/image.png)
don't string quote it