#Angular + HTTPS NodeJS

33 messages · Page 1 of 1 (latest)

cloud lance
#

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?

lusty knollBOT
#

Project ID: N/A

cloud lance
#

NA

queen vault
#

other way around, the angular frontend will "talk" to the backend

#

do you already have a backend up and running?

cloud lance
#

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

queen vault
#

does that mean you don't currently have any angular code written

cloud lance
#

I could start from zero

#

That's all I have, only the structure with MongoDB

queen vault
#

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

cloud lance
#

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?

queen vault
#

no, angular has nothing to do with mongo or your http nodejs server

#

angular is purely the frontend

#

show me your project now please

cloud lance
queen vault
#

perfect, start programming

cloud lance
#

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

queen vault
#

are you familiar with the fetch API? you use that in your angular app to call endpoints on the backend

cloud lance
#

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?

queen vault
#

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

cloud lance
#

I think that's exactly the point that I don't know how to do... How to call my backend domain

queen vault
#

please watch some YouTube videos because we aren't able to provide coding help, only platform help

cloud lance
#

Alright

#

Thanks for your help, that was a lot already