Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Zab is a static web server for the masses. Many simple but sexy features are built in including clean URLs, templates, simple content management, and much more to come.
npm install -g zab
or for package.json support
npm install --save zab
Create a new project folder (or use an existing project) and use the CLI to initialize.
zab new
You can also run the Zab server to work magic locally.
zab server
The config file can be used to customize your server. It can be found at your-website/zab/config.json
.
root
Sets the root folder of your project (where your index.html lives). Defaults to the project directory.errorPage
Sets the error page used whenever a 404 error is thrown in your application. Will default to Zab's 404 page.routes
An object containing your custom routes. Supports glob patterns, and is great for pushState applications. Routes prioritize from top to bottom. ex:"routes": {
"about/*": "about.html",
"**": "index.html"
}
redirects
An object containing your redirects. Supports glob patterns as well as segments, and will forward with a 301 by default. You can also specify a custom status if using an object. ex:"redirects": {
"/old/path": "/new/path",
"/old/**": "/new/path",
"/old/path/:param": "/new/path/:param",
"/another/old/path": {
"status": 302,
"url": "/new/temporary/page"
}
}
protect
If set to true, Zab will take extra measures to ensure your app's security such as XSS protection and adding extra security headers. Defaults to true
.gzip
If set to true, Zab will gzip the response body. Defaults to false
.host
The host used by the server. Defaults to localhost
.port
The port used by the server. Defaults to 6219
. Note: Node's PORT environment variable will take priority (set by PaaS like Heroku).You can use partials and simple mustache values in your pages, and they will automatically be rendered. Awesome!
To use the basic CMS, you can edit the JSON file at your-website/zab/data.json
, and use those values anywhere in your HTML files. Example:
{
"heading": "Welcome to Zab!",
"name": "Jason Maurer"
}
<h1>{{heading}}</h1>
<p>Hello, my name is {{name}}!</p>
To use a partial, simply point to it in your HTML file using the Mustache format.
{{> path/to/partial.html}}
Initial release of the Zab static web server. More awesomeness to come.
No tests have been written yet. I know, terrible me. Stay tuned...
This is still an early prototype, but we have big plans for Zab in the near future. If you want to contribute or be a part of it, visit us at zab.io for more info, and be sure to sign up for our mailing list. We're also happy to review any pull requests!
Copyright © 2015 Zab · Licensed under the MIT license.
FAQs
zab tools
The npm package zab receives a total of 0 weekly downloads. As such, zab popularity was classified as not popular.
We found that zab 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.