New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cubic

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cubic

📦 Fully Modular JavaScript App Platform.

  • 3.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

cubic

npm Node version dependencies build


Cubic is a simple wrapper that integrates node.js frameworks into one platform that's easy to scale in docker or kubernetes.

This project is still very much in development and lacks documentation in some places, but you can already check out how we've built NexusHub with the help of Cubic.


Features

Cubic comes with everything needed to create a full-size web application for modern standards:

  • Automatically routed API endpoints to HTTP and WebSockets
  • Webpack for optimal dev & prod bundling
  • Full OAuth2 integration
  • Pub/Sub model for real-time data
  • Rate limits and caching on a per-endpoint basis
  • Clear endpoint schema for automated unit tests

We provide all of these features regardless of which http/ws server you choose to use under the hood.


Usage

To install cubic to your project:

npm init
npm install cubic cubic-api cubic-auth cubic-ui cubic-client cubic-defaults

This looks like a lot of things, but that's because you don't actually need more than cubic and cubic-api for a minimal API server. Everything else only extends the base functionality for the sake of showing you a fully working web-app.

Entrypoint

Next we'll create index.js as our entrypoint to the server

// index.js
const Cubic = require('cubic')
const cubic = new Cubic()

// Load auth, view and api nodes needed for a basic setup
cubic.bootstrap()

Ready to go

Now all we need to do is run

node index.js

And Cubic will automatically create some default API endpoints and views that you can learn the basics from.
You'll now find your web-app on localhost:3000 🎉


License

MIT

FAQs

Package last updated on 20 Jan 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc