Code Monkey home page Code Monkey logo

carry-cloud's Introduction

carry-cloud

a module for uplaod the file in node app, make it easy & reliable.

Usage

Install

$ npm install carry-cloud --save-dev

Write the following code into the script field of your package.jion. e.g:

 "scripts": {
    "deploy": "carry-cloud \"dist/**\" --base dist --env test"
  }

Launch command in you Terminal

$ npm run deploy

Options

Property Description Default
name folder name package.name
version version package.version
force overwrite 'false' (@false : not overwrite, @true: force overwrite except production),
itemUploadBefore callback upload before @function: (err, res) => {}
itemCallback callback upload finish when fileItem @function: (err, res) => {}
url upload API http://127.0.0.1:7002/file/cdn method is must POST

Can get more API into bin/carry-cloud

Example

For your better use of this module, i provide a express app, add POST API to test.

So, you can do it.

$ cd carry-cloud/example
$ npm install
$ npm start
$ npm run deploy

You will get response like this;

[satrt]: dist/1.js
[satrt]: dist/2.js
[success]: dist/1.js
[success]: dist/2.js
[complete] carry 2 file(s), success 2 file(s).

After

I want to make it better and better, if you are interested in this module, you can contact me by Email:[email protected]

finally

Welcome fork & star, Thanks All.

carry-cloud's People

Contributors

dependabot[bot] avatar jianfenkezhan avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.