Minor updates

This commit is contained in:
Andrew Scott 2022-08-07 00:03:04 -04:00
parent 56d13b2adf
commit d47a745437
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -14,23 +14,29 @@ At minimum, an API key that can access the the
[Geocoding](https://openweathermap.org/api/geocoding-api) APIs is [Geocoding](https://openweathermap.org/api/geocoding-api) APIs is
required. required.
### Starting the Server
Before starting the server a file named `.env` must be be added to the 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, root directory of the project, or the directory from which you'll execute
with the following fields: the binary file, with the following fields:
``` ```
API_KEY=xxxxxxxxxxxxxxxx API_KEY=xxxxxxxxxxxxxxxx
PORT=xxxxx 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 ## Sending Requests
### Basic Workflow ### Basic Workflow
1. Generate the necessary code for your preferred language from the files in 1. Generate some server-side code and the code for your preferred language from the files in
the proto directory with the protoc compiler the proto directory with the protocol compiler `protoc`
- Note that the `protoc-gen-go` and `protoc-gen-go-grpc` plugins must be installed - Note that the `protoc-gen-go` and `protoc-gen-go-grpc` plugins must be installed to generate the server-side code
2. Import the code into your project 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 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 4. Use the imported code within your own functions to make requests