Build a node pack inside and then run .js file outside
Anyone know how to to build a package inside a folder like this
folder1/folder2/package.json
and then run a index.js
in root folder39 Replies
Project ID:
fd98a4cb-a823-467e-b701-d42af92842f9
You might find these helpful:
- Missing package
- Facing confusion while hosting a MERN stack app.
- Running Sveltekit App inside a monorepo - Build errors - Path not found
⚠️ experimental feature
fd98a4cb-a823-467e-b701-d42af92842f9
can i see your repo so i can understand this better?
where can I share it ? It a private source code I buy from a person
you can send it here, no one here is gonna do anything bad
Here is my project (I have delete some files in it)
there's nothing in there
exastly my main point is to deploy project to railway and run
npm install
inside Server/Core/Server
and then go outside to execute node index.js
Dockerfile
You can send it to me, I can review
Won't share it
If you delete files it will be near impossible to help you
I have send you a source
You mean I can generation my own dockerfile right ?
Thank you, I'll take a look
Oh I see it
adam will get you sorted, i know hes done similar setups before
this is such a
const _0x2cc0f8 = _0x3ed65d;
moment@RageOfFire Can you please explain what the code is supposed to do? I'm working on running it on my own pc, would be helpful to know what the expected behaviour is
It for a server that run with a plugin (from game) for my RPGmaker game to allow multiplayer game
Ah great, thank you
Sounds like you want to add cd commands before your build command, then cd commands to get out of that folder to run your start command
yes that want I need
you can chain commands together by separating them with a semicolon like so:
so here what I get when redeploy
okay start by giving me a list of commands youd run to build this app locally starting from the root of the project folder
first of all I gonna to
npm install
it in Core/Server
but I using window right now so normal I just gonna to head into that folder and open to command promtand then go to root folder run
index.js
fileokay i will think
ill get back to you in a little while
you have tried deploying right? can you show me that little table in the top of the build logs?
https://pastebin.com/GnBE9ji3 here is full build log
Pastebin
Sticky cache enabled==============Using Nixpacks==============conte...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
@RageOfFire
done
add this file to the root of your project
in settings.json you have port defined as 1906, so in the service variables set PORT = 1906
im pretty sure that file will override any build or start commands in the service settings, but just to be safe, clear them before you make a new deployment
Thank you very much this working now ! My only problem left is I still can't connect to server seem port error now. I just generation a domain
https://domain.up.railway.app/
do it need time to exist to internet ?it would typically be accessible within a few seconds of creation
make sure you are using https as a scheme and are not trying to connect to the railway domain with any other port than 443 (aka no port since it's implied with https as the scheme)
oh lol 443 overwrite my port XD
so now port 1906 kind of useless now everything go to 443
thank you very much everything work perfectly fine now
well you can only access your app over 443, you can't open other ports so railway forwards all traffic between the internal port 1906 and 443
but awesome, glad I could help, this was my first time writing up a railway.json config file!
wow success in first time you are gold
lol thanks, have fun with your game dev stuff!