Skip to content

Instantly share code, notes, and snippets.

@agusrichard
Last active October 31, 2021 00:57
Show Gist options
  • Save agusrichard/649878cf5949d93356cc2fc1b7371293 to your computer and use it in GitHub Desktop.
Save agusrichard/649878cf5949d93356cc2fc1b7371293 to your computer and use it in GitHub Desktop.
import http from 'k6/http'
import { sleep } from 'k6'
// This BASE_URL won't work if you're using Docker.
// You'll need to know the IP address of the host.
// Then replace localhost with the IP address.
const BASE_URL = 'http://localhost:3000'
export default function() {
const res = http.get(BASE_URL)
console.log('response body', res.body)
sleep(1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment