Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js react and rest routes in same project

I’m quite new to NodeJS and made a few apps that act like a rest service , and I call the rest service from an HTML page . I have also made a few react apps.

Question : can I have these 2 types of apps in the same app , so that my react apps can use the local rest URLs. If so , how do I start the app? ( given that there are 2 different command lines to start each type of app.

Sorry if this is a stupid question , still getting my head around all these types of projects . Note : I am using restify package .

Thanks so much.

like image 545
Martin Thompson Avatar asked Feb 17 '26 04:02

Martin Thompson


1 Answers

There are plenty of boilerplates out there and i would start by looking at those for advice. What you're looking for is a really common setup. Here is a nice tutorial i found on the matter. https://daveceddia.com/create-react-app-express-backend/

like image 159
Freddie Avatar answered Feb 19 '26 18:02

Freddie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!