@mupi/cli v0.0.4
Installation
$ yarn install -g @mupi/cli
Description
The mupi
is a solution to simplify some code initializing steps,
and make you easy to deploy your code in a serverless way.
You can create an application, create the dto model,
generate the model to the code as a graphql server,
deploy your code to the cloud in few steps by CLI commands. (for now only support AWS).
The detailed docs will be added in the future, and if you want to collaborate with me together, please contact me: liwuzhao.kuku@gmail.com
Prerequisite
- Setup
aws cli
with an valid account (or get your AWS secret key and provide it to mupi) - Install the latest version
Terraform
Download Link 🐶 - Make sure you're using node.js 14.x version
Usage
Check all usages of mupi by the command: mupi -h
.
I'll show you how to create and deploy a todolist app to the cloud.
- create the mupi application
cd ~/Desktop && mkdir mupi-projects
mupi new todolist
- go into the todolist workspace, then create the todo model
cd todolist
mupi create:model todo
- edit your todo model, add your customized property
/* model/todo.model */
import { Title, Description, ID } from '@mupi/core';
@Title({
title: 'todo management',
subtitle: 'manage your todolist here',
})
export default class TodoModel {
@ID()
@Description('ID')
id: string;
@Description('todo name')
name: string;
@Description('define the description of todo')
description: string;
@Description('the status for todo')
status: number;
}
- generate apollo server backend code
mupi generate:backend todo
- edit your serverless code or build it directly
cd src/backend/todo && npm run build
cd -
- init your infrastructures by terraform
mupi init
- deploy your infrastructures
mupi deploy
- destroy your infrastructures
mupi destroy
Would like to do in the future
- more decorators like:
@Upload
,@List
,@Relating
- more service supporting:
aliyun
/Azure
/Tencent Cloud
- generating the CMS frontend code in micro-frontend way
Contribution
Contact: liwuzhao.kuku@gmail.com
Wechat ID: ohkuku
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago