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:Jump to 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...
22 Replies
Project ID:
N/A
NA
other way around, the angular frontend will "talk" to the backend
do you already have a backend up and running?
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
does that mean you don't currently have any angular code written
Yeah
I could start from zero
That's all I have, only the structure with MongoDB
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
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?
no, angular has nothing to do with mongo or your http nodejs server
angular is purely the frontend
show me your project now please
perfect, start programming
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
are you familiar with the fetch API? you use that in your angular app to call endpoints on the backend
I just have to do the same I was doing on my http-nodejs HTML and JS?
Like
Just those stuff?
And railway will automatically link them?
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
I think that's exactly the point that I don't know how to do... How to call my backend domain
^
please watch some YouTube videos because we aren't able to provide coding help, only platform help
Alright
Thanks for your help, that was a lot already