在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Shpota/goxygen开源软件地址:https://github.com/Shpota/goxygen开源编程语言:Go 95.2%开源软件介绍:
|
Supported Technologies | |||
Front End | Angular | React | Vue |
Back End | Go | ||
Database | MongoDB | MySQL | PostgreSQL |
You need to have Go 1.11 or newer on your machine.
Go 1.17 and later:
go run github.com/shpota/goxygen@latest init my-app
Set the GO111MODULE
environment variable to auto
.
export GO111MODULE=auto
Run
go get -u github.com/shpota/goxygen
go run github.com/shpota/goxygen init my-app
Run
go get -u github.com/shpota/goxygen
go run github.com/shpota/goxygen init my-app
This generates a project in my-app
folder.
By default, it will use React and MongoDB. You can select
a different front end framework and a database using
--frontend
and --db
flags. For instance, this command
will create a project with Vue and PostgreSQL:
go run github.com/shpota/goxygen@latest init --frontend vue --db postgres my-app
The --frontend
flag accepts angular
, react
and vue
.
The --db
flag accepts mongo
, mysql
and postgres
.
The generated project is ready to run with docker-compose
:
cd my-app
docker-compose up
After the build is completed, the application is accessible on http://localhost:8080.
You can find more details on how to work with the generated project in its README file.
my-app
├── server # Go project files
│ ├── db # MongoDB communications
│ ├── model # domain objects
│ ├── web # REST APIs, web server
│ ├── server.go # the starting point of the server
│ └── go.mod # server dependencies
├── webapp
│ ├── public # icons, static files, and index.html
│ ├── src
│ │ ├── App.js # the main React component
│ │ ├── App.css # App component-specific styles
│ │ ├── index.js # the entry point of the application
│ │ └── index.css # global styles
│ ├── package.json # front end dependencies
│ ├── .env.development # holds API endpoint for dev environment
│ └── .env.production # API endpoint for prod environment
├── Dockerfile # builds back end and front end together
├── docker-compose.yml # prod environment deployment descriptor
├── docker-compose-dev.yml # runs local MongoDB for development needs
├── init-db.js # creates a MongoDB collection with test data
├── .dockerignore # specifies files ignored in Docker builds
├── .gitignore
└── README.md # guide on how to use the generated repo
Files such as unit tests or sample components are not included here for simplicity.
Goxygen generates a basic structure of a project and doesn't force you to use a specific set of tools. That's why it doesn't bring unneeded dependencies to your project. It uses only a database driver on the back end side and axios in React and Vue projects. Angular projects use only Angular specific libraries.
If you found a bug or have an idea on how to improve the project open an issue and we will fix it as soon as possible. You can also propose your changes via a Pull Request. Fork the repository, make changes, send us a pull request and we'll review it shortly. We also have a Gitter chat where we discuss all the changes.
Goxygen's logo was created by Egon Elbre.
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论