nodejs-express4-mysql in 2 minutes

a sample application that shows how can be created a restful api service with node.js + express4 + mysql.

just clone the following project and follow its readme.

git clone https://github.com/pjanaya/nodejs-express4-mysql

and test with:

curl –data “username=irman&password=123456&press=%20OK%20” http://localhost:8080/api/users/

{“message”:”User created!”}

curl -XGET “http://localhost:8080/api/users/4″ -d ”

{“id”:4,”username”:”irman”,”password”:”7c4a8d09ca3762af61e59520943dc26494f8941b”}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s