0.1.0 • Published 5 years ago

valle-print-cli v0.1.0

Weekly downloads
4
License
-
Repository
-
Last release
5 years ago

valle-print-cli

Expose a local printer connection (CUPS) to a valle web application.

Project architecture

Architecture focused in:

  • Most security
  • Less memory
  • Easy updates
  • Easy client implementation
  • CUPS integration

Start using the CLI

Install

$ [sudo] npm install -g valle-print-cli

or

$ [sudo] yarn add global valle-print-cli

Run

$ valle

Command Line Usage

Start local API.

$ valle

Start local API with custom PORT.

$ valle -p <port>

Show the project version.

$ valle --version

Show all available commands.

$ valle --help

Start using the npm scripts (For PM2)

Clone the project and install the dependencies

$ git clone https://github.com/valleweb/valle-print-cli.git
$ cd valle-print-cli
$ npm install

Run

$ npm start

or

$ yarn start

Choose a custom port

Configure your custom port creating a .env file following the .env.example file.

Routes

MethodEndpointDescription
GET/Instructions page.
POST/printAPI for print.

POST: /

Request:

{
  "ZPLCodeArray":[],
  "CUPSUrl":"",
  "userName":"",
  "jobName":"",
  "jobId":""
}

Responses:

status: 201

{
  "success": "<Boolean>"
}

All automatic tasks

  • yarn start - Start API (production mode).
  • yarn start-dev - Start API and watch files for reload (development mode).

Versioning

To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.

Contributing

Find on our issues the next steps of the project ;) Want to contribute? Follow these recommendations.

History

See Releases for detailed changelog.

License

MIT License © ValleWeb Team