Wuhan come on 🍻

Online address: Real-time epidemic preview

Git address: 2019-NCOV-virus

I saw a lot of bigwigs writing epidemic visualization tools, so I couldn’t bear it. I hope to make a small contribution to the prevention and control of the epidemic.

function

  • Number of people check
  • National and provincial epidemic map and detailed information
  • The latest news
  • All the information
  • Epidemic trend
  • Mortality and cure rates

preview






Quick start

  • Clone Project: Git Clone github.com/xieyezi/201…
  • Install dependency: CD 2019-NCOV-virus && YARN install
  • Run: yarn start
  • Package: YARN Build
  • Run yarn Global add Serve && Serve Build

The deployment of

Use the Docker Dockerfile file to make an image, and then use nginx to deploy. Dockerfile:

# ncov Dockerfile

# specify node image dependencies for installation and packaging of the projectFROM the node: 10.16.0 AS builder# set the working directory of the container to /app.
WORKDIR /app 
COPY package.json /app/ 
RUN npm config set registry "https://registry.npm.taobao.org/" \
    && npm install
 
COPY . /app   
RUN npm run build 

# Specify nginx configuration project, --from= Builder means to extract the compilation result from the last build (from node: Alpine as Builder), i.e. to put the newly generated dist into nginx
FROM nginx
COPY --from=builder app/build /usr/share/nginx/html/
COPY --from=builder app/nginx.conf /etc/nginx/nginx.conf


Expose container port 80
EXPOSE 80
Copy the code

The data source

  • Celestial Data – Fight pneumonia
  • Map Json
  • Line chart of epidemic development trend

Thank you! I hope the wuhan epidemic will pass soon!