Help deploy a node.js server on railway
I want to deploy some node code with railway
51 Replies
Project ID:
N/A
i started with template but its strange
its using .mjs
my code is like this
can I deploy this
or i need to make changes
yes the project is in the format of a node module
not sure what you mean
I wonder if I can just run
railway link
and it will deploythis might be more what you want
https://github.com/brody192/express-simple
that isn't quite how it works
you will want to fork that repo, clone it to your computer, make the changes you want, push the changes to github, then add a new service from that repo you forked
thanks will try now
cool!
hey @Brody
i am trying to deploy this project with railway now
any problems?
testing it out on stripe side
actually was magical
i did it via ui
oh so no issues?
im trying to change stuff on stripe side
to point to prod url
@Brody can i get logs in railway
oh ok i see it
mm
doesn't seem to work
you changed the template
well duh lol
i mean you changed the part of it that allowed it to work effortlessly on railway
GitHub
express-simple/index.js at main · brody192/express-simple
Contribute to brody192/express-simple development by creating an account on GitHub.
im looking at yours now
please read this docs page to get you back on track
https://docs.railway.app/troubleshoot/fixing-common-errors
ok so i added this
its still failing
unless i miss something else
failing how?
the thing though
well web hooks don't get sent to that url
maybe its a stripe issue
send me the railway domain for that service?
stripe-payment-hooks-production.up.railway.app
btw feature request is so copy gives full url
with https://
not sure why it only gives raw thing
yep, the app works fine
ok then will ask on stripe side
stripe will have some type of logs for why it fails, send them over
and im sure they have a test the webhook endpoint button or something right?
before deploying i was working with it locally
and it worked
stripe listen --forward-to localhost:4242/webhook
i ran thiswhat endpoint do you have registered to handle the stripe webhooks
in code
im not sure i get you
GitHub
stripe-payment-hooks/index.js at main · nikitavoloboev/stripe-payme...
Contribute to nikitavoloboev/stripe-payment-hooks development by creating an account on GitHub.
is my code for stripe web hooks
i get a checkout page like this
created like so
then when users complete the checkout
web hooks should get sent to this railway endpoint
your endpoint is
/webhook
you need to tell stripe to call that endpointok trying with this
you are missing the
/webhook
endpoint herethank you that worked
awsome
for node apps that you have full control over the codebase, its best to define the start command/script in the package.json file, but i see you dont have one