@kenanhancer/

NodejsBabelConfig

Nodejs

No description

fork
loading
Files
  • index.js
  • .babelrc
  • appv1.js
  • appv2.js
  • package.json

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8153785348486746","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"aW1wb3J0IGFwcHYxIGZyb20gJy4vYXBwdjEnOwppbXBvcnQgYXBwdjIgZnJvbSAnLi9hcHB2Mic7Cgpjb25zb2xlLmxvZygnSGVsbG8gTm9kZS5qcyBwcm9qZWN0LicpOwoKY29uc29sZS5sb2coJ01lcmhhYmEgRHVueWEnKTsKCmZ1bmN0aW9uIGFkZCh4LCB5ID0gMTApIHsKCiAgICByZXR1cm4geCArIHk7Cn0KCmFzeW5jIGZ1bmN0aW9uIHdyaXRlTG9nKG1zZyl7CgogICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpPT57CgogICAgICAgIHNldFRpbWVvdXQoKCk9PnJlc29sdmUobXNnKSwgODAwMCk7CiAgICB9KTsKfQoKYXN5bmMgZnVuY3Rpb24gYXBwKCl7CgogICAgLy8gYXBwdjEoKTsKCiAgICAvLyBhcHB2Mi5ncm91cC5zaG93TGlzdCgpOwoKICAgIGNvbnN0IGExID0gYXdhaXQgd3JpdGVMb2coYWRkKDQwKSk7CgogICAgY29uc29sZS5sb2coYTEpOwp9CgphcHAoKTs="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import appv1 from './appv1';
import appv2 from './appv2';

console.log('Hello Node.js project.');

console.log('Merhaba Dunya');

function add(x, y = 10) {

    return x + y;
}

async function writeLog(msg){

    return new Promise((resolve, reject)=>{

        setTimeout(()=>resolve(msg), 8000);
    });
}

async function app(){

    // appv1();

    // appv2.group.showList();

    const a1 = await writeLog(add(40));

    console.log(a1);
}

app();
node v10.16.0