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.
cng-auto-server
Advanced tools
cd /my-projects
mkdir my-api-www-api-resful-test
cd my-api-www-api-resful-test
npm init -y
npm install cng-auto-server@latest cng-node-js-utils@latest node-js-orm@latest client-socket-nodejs@latest
npm install cng-auto-server@latest
npm i fs path mime-types
# delete ./package.json and run this command:
node ./node_modules/cng-auto-server/sync-libs/sync-test-libs.js
# install all libs for api
npm i
# run sample server
node ./server.js
# define in package.json for test
npm test
# or
# define in package.json for start
npm start
mkdir logs
mkdir cfg
cp ./cfg-sample ./cfg
# 1. config db connection in ./cfg
# 2. edit ./db/excel/... sample.xlsx for function_apis, and models
# 3. config for all ./config params and paths
# 4. create databases, models
# 5. run to make resfule server
node ./test/create-api-functions/create-routers-handlers/x-create-api-routers-handlers.js
http://localhost: for test apis
http://localhost:/ for your web server
or you can config in server-<...>.js such as:
// add libs
const path = require("path");
// add root
const ROOT_DIR = __dirname
.split(path.sep)
.slice(0, __dirname.split(path.sep).length - 0)
.join(path.sep);
const expressCfg = {
// port: 8080
// ...
// root page when http(s)://<hostname:port>/ with index.html for test APIS
, staticRoot: `${ROOT_DIR}/client-test-api`
// subdirectory when http(s)://<hostname:port>/<baseDirectory> with index.html for your project app
, staticHtml: `${ROOT_DIR}/client-www-sample`
// ...
};
FAQs
for nodejs create javascript source code auto
The npm package cng-auto-server receives a total of 2 weekly downloads. As such, cng-auto-server popularity was classified as not popular.
We found that cng-auto-server 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.