You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 9, 2025. It is now read-only.
Then we'll create a.babelrc file for configuring babel.
$ touch .babelrc
This will host any options we might want to configurebabel with.
{"presets": ["@babel/preset-env"]}
Then create our server inindex.js.
$ touch index.js
importhttpfrom'http';constserver=http.createServer((req,res)=>{res.writeHead(200,{'Content-Type':'text/plain'});res.end('Hello World\n');}).listen(1337,'127.0.0.1');console.log('Server running at http://127.0.0.1:1337/');exportdefaultserver;
With recent changes to babel, you will need to transpile your ES6 before node can run it.
So, we'll add our first script,build, inpackage.json.