Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wendelladriel/go-native-packages-talk
Simple example created to use in a talk
https://github.com/wendelladriel/go-native-packages-talk
boilerplate example golang server talk
Last synced: 11 days ago
JSON representation
Simple example created to use in a talk
- Host: GitHub
- URL: https://github.com/wendelladriel/go-native-packages-talk
- Owner: WendellAdriel
- License: mit
- Created: 2017-12-14T13:43:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-02T06:03:50.000Z (about 4 years ago)
- Last Synced: 2024-06-21T07:44:20.362Z (5 months ago)
- Topics: boilerplate, example, golang, server, talk
- Language: Go
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Native Packages Talk
> Simple example created to use in a talk
## How to use
- Clone this repo and enter it
- Run the `build.sh` script, it will create three binaries for the application (**windows/amd64** **windows/386** **darwin/amd64**) inside a `builds/` directory
- If you pass a name to the `build` script, it will use it to create your binaries. Ex: If you run the script like this: `build.sh myapp` it will create: **myapp_windows_amd64.exe**, **myapp_windows_386.exe** and **myapp_darwin_amd64**, otherwise it will use **my-go-server** as the default name.
- While the **HTTP Server** is running you can stop it with `Ctrl + C` in the terminal. It will shutdown the server gracefully.
## Commands available
Below is a list of commands you can use. The examples will use the default app name: **my-go-server**, if you built it with a **custom name**, use it instead of the default to run the commands.
- To show the application info (version, name, etc) run:
```
builds/my-go-server -version
OR
builds/my-go-server -v
```- To show the application options run:
```
builds/my-go-server -help
OR
builds/my-go-server -h
```- To start the **HTTP Server** at the default port (defined at `config/config.go`) run:
```
builds/my-go-server -start
OR
builds/my-go-server -s
```- To start the **HTTP Server** at a custom port run (like 5000):
```
builds/my-go-server -start -port 5000
OR
builds/my-go-server -s -p 5000
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/WendellAdriel/go-native-packages-talk/.
This project is intended to be a safe, welcoming space for collaboration.## License
This project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).