Last active
February 9, 2022 23:16
-
-
Save simonplend/f74b784c94817e0df85fadf631326ef1 to your computer and use it in GitHub Desktop.
Node.js v17.5.0 nightly build test - see instructions.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"url": "https://jsonplaceholder.typicode.com/todos/1" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download v17.5.0 nightly build for Linux x64 | |
# | |
# If you're on a Mac, replace `linux-x64.tar.gz` with: | |
# | |
# - Apple M1 Mac - darwin-arm64.tar.gz | |
# - Intel-based Mac - darwin-x64.tar.gz | |
curl -O https://nodejs.org/download/nightly/v17.5.0-nightly20220209e43808936a/node-v17.5.0-nightly20220209e43808936a-linux-x64.tar.gz | |
# Extract the build | |
tar xzvf node-v17.5.0-nightly20220209e43808936a-linux-x64.tar.gz | |
# Download the test script and JSON config file | |
curl -O https://gist.githubusercontent.com/simonplend/f74b784c94817e0df85fadf631326ef1/raw/8520db97bff2b5d4b208830fc5d2414af7c6de59/test.mjs | |
curl -O https://gist.githubusercontent.com/simonplend/f74b784c94817e0df85fadf631326ef1/raw/8520db97bff2b5d4b208830fc5d2414af7c6de59/config.json | |
# Run the test script with Node.js v17.5.0 nightly build | |
node-v17.5.0-nightly20220209e43808936a-linux-x64/bin/node --experimental-fetch test.mjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(node:305617) ExperimentalWarning: Fetch is an experimental feature. This feature could change at any time | |
(Use `node --trace-warnings ...` to show where the warning was created) | |
(node:305617) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time | |
{ userId: 1, id: 1, title: 'delectus aut autem', completed: false } | |
(node:305617) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import config from "./config.json" assert { type: "json" }; | |
const response = await fetch(config.url); | |
const json = await response.json(); | |
console.log(json); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment