Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
To Install Nopi:
$ npm install nopi.js -g
To see a list of commands:
$ nopi
To Generate a new API:
$ nopi new apiName
When you create a new project, Nopi will run npm install
automatically in the created project directory. All you have to do is be patient, it is not frozen.
Once it is done, cd to API and start the server with:
$ npm start
When generating a new API project, you can select from:
mongo
|| postgres
In your projects package.json
there is a nopi_database
field
which is used in Model file creation.
To generate a new controller or model file:
$ nopi controller fileName
$ nopi model fileName
Controller files which are generated by Nopi should be added to the index.js
controller file. Once added to the index, they are connected to the Express server. Within the Controller files generated by Nopi, you can route, create CRUD actions, and do anything you wish with your API.
Model files which are generated by Nopi change depending on the type of project API that was generated. Within the package.json
there is a nopi_database
field with the type of DB chosen on generation.
Nopi uses this field inside the package.json
to determine which Model file it needs to generate.
MongoDB: If mongo
is chosen on API generation, mongoose.js
is used by default and Models which work with mongoose.js
which be chosen.
Postgresql: If postgres
is chosen on API generation, sequelize.js
is used and Models and Migrations used within sequelize.js
will be generated.
Use these commands in the root of your project.
On file creation, Nopi will look through your working project directory for controller and model folders and create the corresponding file type. If none of these folders exist, Nopi will create the file in the root of your project.
Nopi also creates .nopiPath
folder in your project and saves the path of the file type generated. This is to optimize the speed of file creation. By saving this path Nopi does not have to dynamically find the folder again after each generated file.
If your project directory changes at all, delete .nopiPath
folder to recache folder paths. .nopiPath
folder is added to .gitignore
also.
You cannot create files that already exist.
If you would like to contribute, it would be greatly appreciated.
$ nopi -h
| $ nopi -V
| $ nopi
FAQs
CLI Tool/Framework for generating Node APIs, MVC Projects, and Files
The npm package nopi.js receives a total of 0 weekly downloads. As such, nopi.js popularity was classified as not popular.
We found that nopi.js 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.