Mike
how to get shared variables?
hello, been trying to use railway to deploy a discord.js bot, but i can't seem to get my token working.
GitHub understandably won't let me upload a discord token to my repo, since other people could see it and mess with my bot, so i'm tryna figure out shared variables.
i put my token as a shared variable on my project, shared it to my deployment, and i put
"token":"${{shared.token}}"
into my config.json
, where my token once was.
(my config.json, where i'm trying to access the variable ↓)
however, when trying to use const {token} = require('./config.json')
and deploying it, it says i have an invalid token.
my code is being run on railway, from a GitHub repo.
what exactly am i doing wrong here, and what should i do to get my shared variables?
my project id: d318ba42-07f6-4530-bc4e-7154f0f6d8246 replies