Socket
Socket
Sign inDemoInstall

@metaparticle/package

Package Overview
Dependencies
94
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @metaparticle/package

Automated tooling for easy container images


Version published
Maintainers
1
Created

Readme

Source

Metaparticle/Package for JavaScript

Metaparticle/Package is a collection of libraries intended to make building and deploying containers a seamless and idiomatic experience for developers.

This is the implementation for JavaScript (NodeJS).

Introduction

Metaparticle/Package simplifies and centralizes the task of building and deploying a container image.

Here is a quick example.

Consider this simple Javascript application:

console.log('hello world!');

To containerize this application, you need to use the @metaparticle/package library and the containerize wrapper function like this:

const mp = require('@metaparticle/package');

mp.containerize(
	{
		repository: 'brendanburns',
	},
	() => {
        console.log('hello world');
	}
);

You can then compile this application just as you have before. But now, when you run the application, instead of printing "Hello world", it first packages itself as a container, and then (optionally) deploys itself inside that container.

Tutorial

For a more complete exploration of the Metaparticle/Package for javascript, please see the in-depth tutorial.

Use ACI

const mp = require('@metaparticle/package');

mp.containerize(
    {
		repository: 'myrepo',
		publish: 'true',
		runner: 'aci',
		resourceGroup: 'myResourceGroup',
		subscriptionId: '00000000-0000-0000-0000-000000000000',
		public: 'true',
		ports: [80],
		clientId: '00000000-0000-0000-0000-000000000000',
		clientSecret: 'mykey',
		tenantId: '00000000-0000-0000-0000-000000000000'
    },
    () => {
        console.log('hello world');
    }
);

Keywords

FAQs

Last updated on 25 Mar 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc