diff --git a/cmd/run.go b/cmd/run.go index 7c8b8a1f..d1d4f065 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -126,8 +126,8 @@ var runCmd = &cobra.Command{ server := &http.Server{ Handler: router, Addr: addr, - WriteTimeout: 60 * time.Second, - ReadTimeout: 60 * time.Second, + WriteTimeout: 120 * time.Second, + ReadTimeout: 120 * time.Second, } log.Info().Msgf("Server started on %s\n", addr) diff --git a/docs/installation.md b/docs/installation.md index 33ec3b7f..45a465e0 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -32,49 +32,54 @@ The runtime is responsible for managing the development environments, executing brew install hide ``` -After installing Hide, you can start the runtime by running the following command: - -```bash -hide run -``` - -You should see logs indicating that the server is running, something like: `Server started on 127.0.0.1:8080`. For more options, including how to specify the port, see help: - -```bash -hide --help -``` - ### Building from Source To build Hide from source, follow these steps: 1. Ensure you have [Go 1.22+](https://go.dev/) or later installed on your system. -2. Clone the Hide repository: +2. Clone the repository: ```bash git clone https://github.com/artmoskvin/hide.git cd hide ``` -3. Build the project: +3. Build Hide and install it to your `$HOME/go/bin` directory: ```bash - make build + make install ``` -4. (Optional) Install Hide to your `$GOPATH/bin` directory: + !!! note + + Make sure that `$HOME/go/bin` is in your `$PATH` environment variable e.g. `export PATH=$PATH:$HOME/go/bin`. + + +4. Install LSP server for your language of choice. + + For Python, install the `pyright` package: ```bash - make install + pipx install pyright ``` -After building from source, you can run Hide by running the following command from the project directory: + Note that we use [pipx](https://pipx.pypa.io/stable/) to install the package globally in isolated environment. After installation run `pyright` command in the shell to install `nodejs` if it's missing (Pyright is written in Typescript and it will install `nodejs` for you). -```bash -./hide run -``` + For JavaScript and TypeScript, install the `typescript-language-server` package: + + ```bash + npm install -g typescript-language-server + ``` + + For Go, install the `gopls` package: -or if you've installed it to your `$GOPATH/bin`: + ```bash + go install golang.org/x/tools/gopls@latest + ``` + +### Running Hide + +After installing Hide, you can start the runtime by running the following command: ```bash hide run