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

zmp-cli

Package Overview
Dependencies
Maintainers
2
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zmp-cli

ZMP command line utility (CLI)

  • 1.4.0-0
  • npm
  • Socket score

Version published
Weekly downloads
130
decreased by-16.13%
Maintainers
2
Weekly downloads
 
Created
Source

ZMP CLI

ZMP command line utility makes easier to create Zalo Mini Program (ZMP). CLI the most recommended way to start ZMP app development.

image

Guide

  • Features
  • Installation
  • Usage
  • Configuration
  • APIs

Features

  • Create a Zalo Mini Program with React Framework.
  • Deploy the mini program to Zalo Server.

Installation

Install zmp-cli (may require "sudo"):

$ npm install -g zmp-cli

Usage

Run the following command to get usage helps:

$ zmp

Directly:

$ zmp <command> [options]

Create Zalo APP

  1. Open Zalo for Developers and login with Zalo account.
  2. Create new app with following step:
    1. Click on your avatar and choose Thêm ứng dụng mới
    2. Input your app information.
    3. Click Tạo ID ứng dụng
  3. Active your app

Get Zalo APP Access Token

  1. Open Zalo for Developers and login with Zalo account.
  2. On Navigation Bar, choose Công cụ -> API Explorer
  3. On API Explorer, select your app and click Lấy User Access Token

Create ZMP

To create ZMP app, create a Zalo app and run the following command in the directory where you want to create app:

$ mkdir mini-app && cd mini-app
$ zmp create

Program will prompt for few questions about Zalo App ID, Zalo access token, framework and template you want to start with.

Create ZMP with user interface

Run the following command in the directory where you want to create app:

$ zmp create --ui

It will launch UI where you will be able to configure the project. By default it launches server on localhost:3001 address. If you want to change the port then use --port <n> argument:

$ zmp create --ui --port 8080

Start ZMP

$ zmp start

Deploy ZMP

$ zmp deploy

To open your app, you must use Zalo App to scan QR code after deploy done

Configuration

Change file app.json to config your app when it is launched.

Example:

{
  "window": {
    "titleHeader": "My App",
    "orientation": 0,
    "color": "#15A6FB",
    "rightMenu": {
      "data": [],
      "supportToolBar": 0,
      "reset": 0
    },
    "leftMenu": {
      "buttonType": 1,
      "confirmToExit": 1,
      "dialogMessage": "Bạn có muốn đóng app này không?"
    }
  },
  "debug": false
}

APIs

View APIs

Keywords

FAQs

Package last updated on 12 Apr 2021

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