- Go v1.12.1
-
First install DevSpaces client application, follow the instructions here to do this.
-
Clone this repository locally
-
To create a DevSpace, open a terminal then navigate to the cloned repository directory and run following command
devspaces create
This will open a build status window and shows you the progress of DevSpace creation. Once build is successful validated starts.
-
Once validation is completed. Run
devspaces ls
command to see the list of DevSpaces and corresponding status. Newly created DevSpacegolang
will be in "Stopped" status. -
To start your DevSpace run following command
devspaces start golang
You will receive a notification when your DevSpace is ready to be used.
- To get inside your DevSpace, run following command
devspaces exec golang
- From a new terminal, clone the demo application repository
git clone https://github.com/valyala/fasthttp.git
- Navigate to cloned demo application directory
cd fasthttp
- To synchronization code from your local machine to your DevSpace. Run following command
devspaces bind golang
This will synchronize files from your current working directory to your DevSpace. It might takes some time to complete, depending on the repository size.
- Get inside your DevSpace by running following command
devspaces exec golang
-
Once you're inside DevSpace, you should be able see
fasthttp
project files under/data
directory. -
Build application
go get -t -v ./...
go build ./...
- Run Tests
go test -v ./...
- Run application.
cd examples/fileserver
go build fileserver.go
./fileserver -addr=0.0.0.0:80 -dir=./
Now application is running. To get the public URL exposed by DevSpace, run following command from your local terminal devspaces info golang
. Command will output http URL which you can open in your browser to access the application.