I'm new to Sails.js and Node.js and I have problems with creating documentation for my application.
Here's my steps:
- installed apidoc by:
npm install apidoc -g - installed grunt module:
npm install grunt-apidoc --save-dev - added
grunt.loadNpmTasks('grunt-apidoc');toGruntfile.jsat the bottom - created
grunt.initConfigfile and put:
apidoc: {
myapp: {
src: "api/controllers/",
dest: "apidoc/"
}
}
Then I'm trying to run multiple things, and none of them produces my api documentation:
- sails lift
- grunt
- grunt default
- node app.js
If I run it manually by apidoc -i api/controllers/ -o apidoc/ it's working properly.
What am I doing wrong? How to do it?
grunt.registerTask('apidoc', ['apidoc']);- bhb