A simple but well tested demo of a web application by express and mongoose.
This application includes:
- easy to understand MVC architecture.
- save and manage bookmarks(url)
- CRUD support by Mongoose
- simple RESTful interface(
[GET|POST|PUT|DELETE] /bookmark
) - unit tested over http by Mocha + Supertest + should.js
- all tasks are written in Gruntfile.js
git clone [email protected]:FL4TLiN3/express-mongoose-demo.git
cd express-mongoose-demo
mkdir log
npm install -l
mkdir node_modules/share
ln -s lib/share.js node_modules/share/index.html
grunt nodemon
then your RESTful server is standing by.
you can access:
list of all bookmarks.
show specified bookmark.
@param
bookmarkID
save a bookmark.
@param
url
update specified bookmark.
@param
bookmarkID
delete specified bookmark.
@param
bookmarkID
grunt simplemocha
# or
grunt test # this command gonna watch test-target files
MIT