Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

iopa-core

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iopa-core

IOPA API-first, Internet of Things (IoT) stack for Node.js, official implementation

latest
Source
npmnpm
Version
1.3.2
Version published
Maintainers
1
Created
Source

IOPA
IOPA Core

Build Status NPM limerun

NPM

About

The 160Kb bundle includes a full optimized bundle of the lightweight IOPA fabric.
It is a single javascript file with no dependencies.

Includes:

  • IOPA server to run on both Node and NodeKit
  • IOPA router for server-side URL routing
  • IOPA static to server up static files (e.g., css, js, etc.)
  • IOPA templates engine including handlebars
  • IOPA connect to use vanilla Node HTTP transport

Installation

npm install iopa-core

Basic Example

const iopa = require('iopa-core'),
      static = iopa.static,
      templates = iopa.templates,
      router = iopa.router,
      handlebars = iopa.handlebars;
      
var app = new iopa.App();
       
app.use(templates);

app.use(router);

app.engine('.hbs', handlebars({
    defaultLayout: 'main', 
    views: 'views'
 }));
    
app.use(static(app, './public'));

app.get('/', function (context) {
   return context.render('home.hbs');
});

http.createServer(app.buildHttp()).listen(3000);

Build

git clone https://github.com/iopa-io/iopa-core.git 
npm install
npm run build

Minified version of entire IOPA fabric is placed in dest directory

Distribution

Simply copy the dest directory to your next project for a drop in expressjs like replacement.

FAQs

Package last updated on 12 Mar 2016

Did you know?

Socket

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.

Install

Related posts