

Ask HN: Suggested backend(s) for JavaScript MVC tutorial? - eliot_sykes

I&#x27;m considering writing a tutorial on JavaScript MVC frameworks, and a large part of it would ideally use a backend for server dependent demos like signing a user in and making RESTful API calls.<p>What do you suggest as ways of making this backend easy to run locally for a range of developer experience and operating systems? The only thing the developers would have in common is that they know some JavaScript.
======
facorreia
PHP is known for being widely supported and easy to get running. It does
require integration with a web server, though, which can present some
complexities for novice installing it on random environments (which may
already have a web server running, so configuration instructions become
complex).

Node.js would be an interesting alternative because you could keep it
JavaScript-only across the tiers. It is supported across operating systems and
it's easy to install. For instance, on Windows it can be installed as "cinst
nodejs".

For database I recommend SQLite since it would avoid a lot of friction
associated with database servers (ports, permission, etc.)

------
poissonpie
Try [http://www.redbeanphp.com/](http://www.redbeanphp.com/) and
[http://redbeanphp.com/extra/beancan_server](http://redbeanphp.com/extra/beancan_server)
specifically - it's a minimal bit of php with some magic that will probably
mean you won't have to get too much into the server side of things with your
tutorial.

------
bennyp101
For quick testing rest Apis I use [http://sailsjs.org/](http://sailsjs.org/)

------
kissmd
if static data is enough, you can simple place it to files and serve as simple
http

~~~
eliot_sykes
Is there a particular server you'd recommend?

~~~
kissmd
sry for the late answer.

you don't even need to run apache or a node.js file server for this.

just put your responses into files on a relative path according to your
request. eg: api/product/31.json api/product?orderby=name
api/product?orderby=price

so if you have a demo webapp just package the static data with your app and
redirect/configure api calls to the service in the live app

