mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-20 12:03:10 -05:00
Minor updates
This commit is contained in:
parent
56d13b2adf
commit
d47a745437
1 changed files with 12 additions and 6 deletions
18
README.md
18
README.md
|
@ -14,23 +14,29 @@ At minimum, an API key that can access the the
|
|||
[Geocoding](https://openweathermap.org/api/geocoding-api) APIs is
|
||||
required.
|
||||
|
||||
### Starting the Server
|
||||
|
||||
Before starting the server a file named `.env` must be be added to the
|
||||
root directory of the project, or the directory that contains the binary file,
|
||||
with the following fields:
|
||||
root directory of the project, or the directory from which you'll execute
|
||||
the binary file, with the following fields:
|
||||
|
||||
```
|
||||
API_KEY=xxxxxxxxxxxxxxxx
|
||||
PORT=xxxxx
|
||||
```
|
||||
|
||||
If you don't want to compile the code or can't use one of the binary releases
|
||||
you can run the server with the command `go run server/*.go` from the
|
||||
root of the project.
|
||||
|
||||
## Sending Requests
|
||||
|
||||
### Basic Workflow
|
||||
|
||||
1. Generate the necessary code for your preferred language from the files in
|
||||
the proto directory with the protoc compiler
|
||||
- Note that the `protoc-gen-go` and `protoc-gen-go-grpc` plugins must be installed
|
||||
2. Import the code into your project
|
||||
1. Generate some server-side code and the code for your preferred language from the files in
|
||||
the proto directory with the protocol compiler `protoc`
|
||||
- Note that the `protoc-gen-go` and `protoc-gen-go-grpc` plugins must be installed to generate the server-side code
|
||||
2. Import your newly generated code into your project (Leave the servers code in the proto directory)
|
||||
3. Use the imported code to allow your client to connect with the server
|
||||
4. Use the imported code within your own functions to make requests
|
||||
|
||||
|
|
Loading…
Reference in a new issue