Git Product home page Git Product logo

calculator's Introduction

Calculator.js: node.js 演示项目

本应用使用node.js创建,并包含了试用mocha的单元测试代码。本应用的运行状态为网页中的计算器,如下图:

代码中使用node.js代码提供了REST APIs,其中提供各种数学计算功能单元。

使用mocah编写的测试代码可以完成所有以上API内部运算运算逻辑的验证,最终使用 mocha-junit-reports 来生成XML格式的测试结果文件以便 Azure DevOps 可以读取测试结果提供DevOps流水线的测试集成。

本地构建本项目的方式:

  1. 运行 npm install 安装所有依赖包
  2. 运行 npm test 运行所有测试
  3. 运行 npm start 启动应用,并打开 http://localhost:3000

使用Docker构建和运行项目的方式:

  1. 复制 _demo-assets/demo-dockerfile 到根目录下的Dockerfile文件

  2. 运行以下命令完成 calculator 容器构建打包

docker build -t calculator .
  1. 运行 calculator 容器
docker run -itd -p 8080:3000 calculator

打开 http://localhost:8080

应用启动后的状态如上图。

calculator's People

Contributors

ups216 avatar ethomson avatar azure-pipelines[bot] avatar leixu216 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.