Angular + HTTPS NodeJS

Hello, I have a deployment where I have my server running, but I would like to implement angular, could someone help me out on how to run a backend server to "talk" to my angular project?
Solution:
go here https://railway.app/account/feature-flags and enable "template service eject" open your project and deploy the "angular 18 static" template open the service settings of the deployed service and eject it clone that ejected repo and start coding...
Jump to solution
22 Replies
Percy
Percy3w ago
Project ID: N/A
KChammas
KChammas3w ago
NA
Brody
Brody3w ago
other way around, the angular frontend will "talk" to the backend do you already have a backend up and running?
KChammas
KChammas3w ago
I have a sample project actually, nothing too big c79bd679-e479-4c34-b56d-1acc8c93dfc0 I have the HTTP NodeJS running, and I would like to implement angular Or I can start from zero as well
Brody
Brody3w ago
does that mean you don't currently have any angular code written
KChammas
KChammas3w ago
Yeah I could start from zero
KChammas
KChammas3w ago
That's all I have, only the structure with MongoDB
No description
Solution
Brody
Brody3w ago
go here https://railway.app/account/feature-flags and enable "template service eject" open your project and deploy the "angular 18 static" template open the service settings of the deployed service and eject it clone that ejected repo and start coding
KChammas
KChammas3w ago
Okay, done! Now the repository is on my github, so now, I can add MongoDB to the Angular Server? And should I delete the http-nodejs from my project?
Brody
Brody3w ago
no, angular has nothing to do with mongo or your http nodejs server angular is purely the frontend show me your project now please
KChammas
KChammas3w ago
No description
Brody
Brody3w ago
perfect, start programming
KChammas
KChammas3w ago
Thanks, sorry to ask too many questions, but how do I "link" the angular with my backend "server.mjs"? This is my server.mjs inside the "http-nodejs" How do I make an app.get/app.post from my angular to my server
No description
Brody
Brody3w ago
are you familiar with the fetch API? you use that in your angular app to call endpoints on the backend
KChammas
KChammas3w ago
I just have to do the same I was doing on my http-nodejs HTML and JS? Like
KChammas
KChammas3w ago
No description
KChammas
KChammas3w ago
Just those stuff?
No description
KChammas
KChammas3w ago
And railway will automatically link them?
Brody
Brody3w ago
I'm not sure where this linking is coming from, you need to write code to call your backend's domain, at this point it's all your code, not much to do with railway anymore
KChammas
KChammas3w ago
I think that's exactly the point that I don't know how to do... How to call my backend domain
Brody
Brody3w ago
^ please watch some YouTube videos because we aren't able to provide coding help, only platform help
KChammas
KChammas3w ago
Alright Thanks for your help, that was a lot already