Created
March 21, 2023 09:10
-
-
Save carloscasalar/04539f3945d584382537d4ef0468a0f5 to your computer and use it in GitHub Desktop.
Simple plain node setup with module imports
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 {otherConst} from "./other-file.js"; | |
import someData from './some-data.json' assert { type: "json" } | |
console.log('hola'); | |
console.log(otherConst); | |
const {some} = someData; | |
console.log(some); |
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
export const otherConst = 'bla ble blu'; |
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
{ | |
"name": "nodetest", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"type": "module", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "node index.js" | |
}, | |
"author": "", | |
"license": "ISC", | |
"volta": { | |
"node": "18.15.0", | |
"npm": "9.5.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
{ | |
"some": "data" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment