Giter VIP home page Giter VIP logo

mihiru-go's Introduction

个人站点mihiru.com的后端接口项目, 原先采用Spring Boot开发, 感觉太占用内存上了Quarkus+GraalVM重构了一遍, 虽然内存占用降低了不少但还是挺高的. 于是干脆用GO语言又重构了一遍, 顺便把数据库从H2换成了mongodb.

调试运行

sample.yaml复制一份并重命名为dev.yaml, 修改配置内容, 之后在IDE内执行main.go即可

编译生成部署用文件

执行buildLinux.bat可生成AMD64的linux环境下可执行文件, 需要打包其他环境的可执行文件请自行查找go编译可执行文件的相关教程.
执行完后会在项目根路径下生成一个文件名为main的可执行文件, 将该文件拷贝到部署环境后, 为该文件添加执行权限

chmod +x main

在同目录下建立config目录, 在其下新建一个prod.yaml配置文件, 文件内容参考sample.yaml, 按实际情况修改各项配置.
然后使用以下命令即可启动程序

./main -e prod

你也可以使用如下命令在后台运行程序

nohup ./main -e prod 1>mihiru-go.log 2>&1 &

mihiru-go's People

Contributors

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