A CLI tool Which writes all the boiler-plate API and install Dependencies Express body-parser and Selected ORM which can be selected from the list.
- Mongoose ✔️
- TypeORM (coming soon)
⚠️
Either through cloning with git or by using npm (the recommended way):
npm install -g @prkhrv/api-cli And api-cli will be installed globally to your system path.
api-cli requires ORM you want to use and it also initializes package.json and installs all the basic dependecies for the Database/ORM.
$ api-cli --install ? Please choose which database ORM to use (Use arrow keys) ❯ mongoose ? Initialize npm? (y/N) _ __ _ __| | _| |__ _ ____ __ | '_ \| '__| |/ / '_ \| '__\ \ / / | |_) | | | <| | | | | \ V / | .__/|_| |_|\_\_| |_|_| \_/ |_| ✔ Greetings ✔ Initialize npm ✔ Copy project files ✔ Install dependencies DONE Project ready When all the Processes are Completed try running server
node index Mongoose open ./config/database.config.js and simply add Your MongoDB connection URL.
module.exports = { url: 'mongodb://localhost:27017/TestDB' //YOUR LINK HERE }