Giter Site home page Giter Site logo

apit-server's Introduction

APIT-Server(还在开发中)

此项目是“调试API的过程中就可以同步的更新文档”项目的服务端

这里下载

操作方式

设置服务器

先准备Java的运行环境,我是使用OpenJdk11.0.2进行开发

配置相应的配置文件(application-prod.yml)和打包好的jar放在Releases下载的压缩包里

目前是直接贴了Spring Boot的配置,后面会改进下的

server:
  # 服务器端口
  port: 80
spring:
  datasource:
    # 数据库地址
    url: jdbc:mysql://apit_mysql_prod:3306/apit_server?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true&serverTimezone=GMT&jdbcCompliantTruncation=false
    # 用户名
    username: root
    # 密码
    password: root

然后运行

$ java -jar -Dspring.profiles.active=prod ./APIT-Server-0.0.2-beta.jar

或者使用Docker

#基础镜像使用 openjdk:11.0.2-jdk
FROM openjdk:11.0.2-jdk

#作者
MAINTAINER ThisSeanZhang <[email protected]>

#将运行文件拷贝至root
ENV RUN_DIR /root
WORKDIR /root

#定义初始化sql文件
ENV SERVER_JAR APIT-Server-0.0.2-beta.jar
ENV SERVER_CONF application-prod.yml

#拷贝文件
COPY ./$SERVER_JAR $RUN_DIR/
COPY ./$SERVER_CONF $RUN_DIR/

EXPOSE 80

#运行
CMD ["java", "-jar", "-Dspring.profiles.active=prod", "./APIT-Server-0.0.2-beta.jar"]

完(后续再添加吧)

技术

apit-server's People

Contributors

thisseanzhang 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.