UNPKG

3.93 kBMarkdownView Raw
1# blinkmobile / server-cli [![npm](https://img.shields.io/npm/v/@blinkmobile/server-cli.svg?maxAge=2592000)](https://www.npmjs.com/package/@blinkmobile/server-cli) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/blinkmobile/server-cli?branch=master&svg=true)](https://ci.appveyor.com/project/blinkmobile/server-cli) [![Travis CI Status](https://travis-ci.org/blinkmobile/server-cli.svg?branch=master)](https://travis-ci.org/blinkmobile/server-cli) [![Greenkeeper badge](https://badges.greenkeeper.io/blinkmobile/server-cli.svg)](https://greenkeeper.io/)
2
3CLI to develop, test and deploy server-side HTTPS endpoints with BlinkMobile
4
5
6## Installation
7
8```
9npm install -g @blinkmobile/cli @blinkmobile/identity-cli @blinkmobile/server-cli
10```
11
12## Documentation
13
14See the [Documentation](./docs/README.md) directory for more details.
15
16## Usage
17
18```sh
19blinkm server --help
20
21# or, shorter
22bm server --help
23```
24
25```
26Usage: blinkm server <command>
27
28Where command is one of:
29
30 info, serve, scope, deploy, logs, serverless
31
32Local development:
33
34 info => displays project information
35 --cwd <path> => optionally set the path to project, defaults to current working directory
36 serve => start a local development server using local API files
37 --port <port> => sets the port to use for server, defaults to 3000
38 --cwd <path> => optionally set the path to project, defaults to current working directory
39
40Initial settings:
41
42 scope => displays the current scope
43 <project> => sets the project id
44 --region <region> => optionally sets the region
45 --cwd <path> => optionally set the path to project, defaults to current working directory
46
47Deploying server side code:
48
49 The deploy command requires a login to BlinkMobile before use.
50 For help on the login and logout commands please see:
51 https://github.com/blinkmobile/identity-cli#usage
52
53 deploy => deploy the project
54 --force => deploy without confirmation
55 --env <environment> => optionally sets the environment to deploy to, defaults to 'dev'
56 --cwd <path> => optionally set the path to project, defaults to current working directory
57 --provision => force full deployment, only use this if told to by support
58
59Viewing server logs:
60
61 logs => view logs for project
62 --tail => keep listening for new logs in your terminal session
63 --filter <filterPattern> => optionally set a search filter, defaults to all logs
64 --start-time <startTime> => a unit in time to start fetching logs from (ie: 2010-10-20 or 1469705761), defaults to all logs
65 --env <environment> => optionally set the environment to view logs for, defaults to 'dev'
66 --cwd <path> => optionally set the path to project, defaults to current working directory
67
68Create serverless project:
69
70 serverless => create serverless project
71 --deployment-bucket <bucket> => set the deployment S3 bucket
72 --execution-role <role> => set the execution IAM Role ARN
73 --vpc-security-groups <groups> => comma separated list of VPC Security Group identifiers
74 --vpc-subnets <subnets> => comma separated list of VPC Subnet identifiers
75 --bm-server-version <version> => server version of @blinkmobile/sever-cli that the project was created with
76 --env <environment> => optionally set the environment, defaults to 'dev'
77 --cwd <path> => optionally set the path to project, defaults to current working directory
78 --analytics-collector-token <token> => optionally add an analytics collector token
79 --analytics-origin <origin> => optionally add an analytics origin
80```