Which backend for AngularJS?

Associate
Joined
27 Mar 2012
Posts
202
Hi all.

Going to start a new project soon and will probably use Angular for the front end.

I'm just curious what do you guys use as a back end to serve JSON?

Most articles and discussions centre around using NoSQL but we need a relational database which is probably going to be MySQL. So the missing link is how to server JSON from MySQL really.

Express.js seems popular but again it seems to be centred around NoSQL/MongoDB. What other options are there that people actually use?

Thanks.
 
Associate
Joined
4 Feb 2011
Posts
580
Location
Halifax
If you're going with Node.js, both Express and Hapi are great for serving JSON. Express isn't centred around NoSQL because it just handles the serving requests and routing, the rest is up to you.

You could use an ORM or just orchestrate your own logic to serve the JSON (DB query, JSON.stringify, etc).
 
Associate
OP
Joined
27 Mar 2012
Posts
202
Thanks had not heard of Hapi before. I'll have a look.

Sorry when I said centred around NoSQL, I meant the articles (tutorials etc) and discussions on the internet, not the software itself.

I assume they all work well with Google App Engine?
 
Associate
Joined
4 Feb 2011
Posts
580
Location
Halifax
Thanks had not heard of Hapi before. I'll have a look.

Sorry when I said centred around NoSQL, I meant the articles (tutorials etc) and discussions on the internet, not the software itself.

I assume they all work well with Google App Engine?

Ah, apologies :D

There's also Strongloop's loopback which is entirely API based.

GAE shouldn't have a problem with Node.js at all. You can choose which version you want to use by adding the following to package.json

Code:
"engines": {
    "node": "~6.5"
}
 
Last edited:
Associate
OP
Joined
27 Mar 2012
Posts
202
Much appreciated. So are the Node.js offerings the way to go for the back end? It's all new to me because I've been a "traditional" developer for years.
 
Associate
Joined
10 Nov 2013
Posts
1,804
If you implement the access to your backend using an api then the fact that you're using angular doesn't really have any bearing on which backend technology you should use. Given that it's javascript you might find it easier to do it with node because then your not constantly switching languages. But if you have a good knowledge of a different server side language and want to get something working quickly I'd do it in that instead.
 
Back
Top Bottom