Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Web framework built on Node.js.
This node framework is a production-ready Node.js framework that takes advantage of ECMAScript 6 features through the use of 6to5. It is built on top of Express.
View the docs on controllers and views.
The idea here is that you have your app in development on Git. Then you'll clone or deploy to your production server, and run CS in production mode.
> npm install -g cs
> cs init {{appname}}
> npm install
> cs run
See production docs.
> cd {{app dir}}
> cs run
See production docs.
config.json
module.exports = { ... }
env
key is the default. Everything inside the env
key will overwrite those depending on the enviroment you run in. You run different arbitrary enviroments via cs run [myapp] [env]
{
"name": "appname",
"port": "8000",
"session": "redis",
"debug": false,
"db": {
"adapter": "mongodb",
"mongodb" : {
"host": "mongodb://localhost:27017/sixtyvocab"
}
},
"env": {
"production": {
"port": 80
},
"development": {
"debug": true
}
}
}
./controllers
./models
./public
./private
./views
./services
./public
is your web root. All static files, js, css, images, etc. go here../private
is where you put things to be compiled such as stylus, coffeescript, or ES6 files. By default, stylus files will compile and minify files into public/css automatically../services
is the location of all services which are basically CS extended functionality> node index
or > node index development
(development
is the default environment)../app.log
is a log of all database queries.{{log variable}}
to log a hbs variable to the node console{{log variable client=true}}
to log a hbs variable to the browser consolelog()
is a convenient alias to console.log
.CS
is made global.
CS.private
-- all variables available to your view that you passedCS.public
-- variables available to your JS files in CS.publicCS.session
-- the session (which is available in your view)CS.server
-- server vars (which are available in your view)// include and compile a template
var compiledHTML = app.util.include("path/to/file")(data);
Services are a way to share complete parts of CS that are just arbitrary functions.
services/yourservice/index.js
package.json
defining your attributes and dependeciesmodule.exports = ...
Sample service package.json for gmail service
{
"name": "gmail",
"version": "1.0.0",
"description": "Gmail SMTP sending",
"main": "gmail.js",
"keywords": ["gmail","email","smtp"],
"author": "ConnectAi",
"license": "BSD-2-Clause",
"dependencies": {
"emailjs": "~0.3.5"
}
}
Currently the services package.json don't do anything
Read about the cool stuff ES6 can do you for you
Controllers
"/:token1/:token2"
."/:token1/:token2"(req, res, next, param1, param2) {}
"/:id/:username?"(req, res, next, id, username) {}
Views
FAQs
ES6-based framework for Node.js
The npm package cs receives a total of 24 weekly downloads. As such, cs popularity was classified as not popular.
We found that cs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.