Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
nodejs-api-cli
Advanced tools
nodejs-api-cli is a scaffold to start API for different NodeJS fraameworks. for generating nodejs application.
When developing API based application in NodeJS, it is not easy to set it up as easy as possible. The application include but not limited to applications build using Express, Sails.js, kemboijs, Koa.js, hapi, AdonisJS, Nest.js etc. We decided to build this library/utility to help faster set up your API based application. In the fisrt release, We will focus on supporting Express, but will improve on other frameworks and also nodejs itself without use of frameworks. Also, we will aim at building utility that can enhance faster development of upcoming applications i.e creating controllers, services, models or middlewares. In the future, we will also help in fixing issues such as migrations and help with a little debugging.
npm i -g nodejs-api-cli
nodejs-api-cli init
npm start
npm run drop:db
npm run create:db
npm test
NB: Make sure all dependancies are installed. npm install
.
NB: When installing make sure you have admin priviledges otherwise, you will have to use sudo npm i -g nodejs-api-cli
Steps:
nodejs-api-cli -h
or nodejs-api-cli help
nodejs-api-cli -v
or nodejs-api-cli version
npm run start:dev
npm run build
npm start
NB: During development make use of nodejs-api-cli -- -h
or nodejs-api-cli -- -v
The app generates .env
file, where you need to edit its credentials
DATABASE_URL = "postgres://user:pass@example.com:5432/dbname";
TEST_DB = "postgres://user:pass@example.com:5432/testdb";
NODE_ENV = "development";
You can now create, drop any database models. The created models is User, under src/models/user.js
ISC
. You can change it inside my-app-name/package.json
and also add LICENSE
file.git
and its url
left blank for you to set inside my-app-name/package.json
├── src
│ ├─ config
| ├─ index.js
│ ├─ controllers
| ├─ index.js
| ├─ user.js
| ├─ helpers
| ├─ index.js
| ├─ responsehandler.js
│ ├─ middlewares
| ├─ index.js
| ├─ user.js
│ ├─ models
| ├─ index.js
| ├─ setup.js
| ├─ user.js
| └─ routes
| ├─ index.js
| ├─ user.js
| └─ scripts
| ├─ createdb.js
| ├─ dropdb.js
| ├─ index.js
| └─ services
| ├─ index.js
| ├─ user.js
| └─ index.js
├── tests
│ ├─ controllers
│ ├─ index.js
│ ├─ user.js
│ ├─ middlewares
│ ├─ index.js
│ ├─ routes
│ ├─ index.js
│ └─ index.js
└── .env
└── .envexample
└── .gitignore
└── package.json
└── README.md
In general, we follow the "fork-and-pull" Git workflow.
FAQs
nodejs-api-cli is a scaffold to start API for different NodeJS fraameworks. for generating nodejs application.
The npm package nodejs-api-cli receives a total of 0 weekly downloads. As such, nodejs-api-cli popularity was classified as not popular.
We found that nodejs-api-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.