Created
July 16, 2014 07:39
-
-
Save chiehwen/c8587728823c276ae549 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var userMgrAPI = express.Router(); | |
| // A set of API to manage users (/apis/admin/user/:username) | |
| userMgrAPI.route('user/:username') | |
| .get(function(req, res) { | |
| // Getting user information | |
| }) | |
| .post(function(req, res) { | |
| // Create a new user | |
| }) | |
| .delete(function(req, res) { | |
| // Delete specific user | |
| }) | |
| .put(function(req, res) { | |
| // Update | |
| }); | |
| app.use('/apis/admin', userMgrAPI); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment