Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magnet

Package Overview
Dependencies
Maintainers
5
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magnet

A modern approach for async microservices in node.js

  • 2.7.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
5
Weekly downloads
 
Created
Source

✨ Magnet

Simple, fast and unopinionated uses the power of Babel and beyond into your microservices
Travis CI Coverage codebeat badge ebertapp badge Npm License

Getting started

npm install -g magnet

Generate a boilerplate project:

mkdir myproject/
magnet generate

Results in

~/D/myproject ❯❯❯ magnet generate
> info Generating files
> info Done.

Then install dependencies and run:

npm install
npm run dev

Results in

~/D/myproject ❯❯❯ npm run dev

> myproject@ dev /Users/eduardo/Desktop/myproject
> magnet

> info Building assets…

┌────────┬──────┬──────┬───────────┐
│ method │ path │ type │ file      │
├────────┼──────┼──────┼───────────┤
│ GET    │ /api │ json │ /api.js   │
│ GET    │ /    │ html │ /index.js │
└────────┴──────┴──────┴───────────┘

> info Ready on http://0.0.0.0:3000

Your microservice is ready for development on http://localhost:3000!

Debugging options

For better debugging you can use NDB

After installing NDB, just run:

ndb npm run dev

Running in production

To run your application in production use npm start instead and Magnet will serve your application optimized for production.

Examples

If you need examples of magnet usage, you can access othe examples on its repository folder.

License

BSD License © Liferay, Inc.

Keywords

FAQs

Package last updated on 09 Aug 2019

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