Code Monkey home page Code Monkey logo

art-static-service's Introduction

art-static-service

For art testing environment publish code service

Preparation before use

  1. download this package on your server.
  • command
git clone https://github.com/yuguomin/art-static-service.git
  • or any other way like scp...
  1. install global dependencies
sudo yarn global add pm2
  1. install package dependencies
  • use command cd this folder
  • command
yarn install

Start service

  1. use command cd this folder
  2. command
yarn start
  • will start server and listen on 9090 port, if you want to change, please write ecosystem.config.js env.PORT, and you can also open more service together
  1. command
yarn list
  • will see pm2 progress management interface

Stop service

  1. command
yarn close
  • will use command => pm2 delete all
  • will stop all pm2 manage process, If you just want to stop one of them, please use pm2 command
pm2 delete <id|name>

Upload file

  1. url '/upload_static'
  2. methods POST PUT
  3. params
  • file: use fs.createReadStream function
  • path: The files will be tied there

Get file

  1. url '/', this will map to './static/frontend/'
  2. methods GET

Error logs

use winston collect logs, path: '/logs/error.log' at present only collect code >= 400 message to log.

pm2 commands

  1. look pm2 process
pm2 list
  1. delete one process
pm2 delete <id|name>
  1. delete all process
pm2 delete all
  1. open process
pm2 start <path>

The related documents

pm2 windston

art-static-service's People

Contributors

yuguomin avatar

Stargazers

zing_zhang avatar

Watchers

James Cloos 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.