weather api

栏目: IT技术 · 发布时间: 6年前

内容简介:weatherApi by openweathermapbuild images and start containercheck images and container

weatherApi

weatherApi by openweathermap

Requirement:

  • install yarn
  • install node (v12+)
  • install mongodb

Testing and run:

$ yarn

// development
$ yarn run dev

// production
$ yarn run start

// run test case
$ yarn run test

// use eslint and prettier to format code
$ yarn run lint

Docker:

  • Dockerfile

build images and start container

docker build -t <username>/weather-api:<tag> .
docker run -p 3000:3000 -d <username>/weather-api:<tag>
docker exec -it <containerId> /bin/bash
docker logs <containerId>

check images and container

docker images
docker ps
docker ps -a

open localhost:3000

  • docker-compose.yml

build images and start container

docker-compose build
docker-compose up

build images and start container in one line

docker-compose up -d --build

stop container

docker-compose stop

add tag to docker images

$ docker tag <imageId> <dockerHubUserName>/<imageName>:<tag>

push docker images to docker hub

$ docker push <dockerHubUserName>/<imageName>:<tag>

open localhost:3000

Contributing

Please refer to CONTRIBUTING.md


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

程序员修炼之道

程序员修炼之道

Andrew Hunt、David Thomas / 马维达 / 电子工业出版社 / 2011-1 / 55.00元

《程序员修炼之道:从小工到专家》内容简介:《程序员修炼之道》由一系列独立的部分组成,涵盖的主题从个人责任、职业发展,知道用于使代码保持灵活、并且易于改编和复用的各种架构技术,利用许多富有娱乐性的奇闻轶事、有思想性的例子及有趣的类比,全面阐释了软件开发的许多不同方面的最佳实践和重大陷阱。无论你是初学者,是有经验的程序员,还是软件项目经理,《程序员修炼之道:从小工到专家》都适合你阅读。一起来看看 《程序员修炼之道》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具