@kenanhancer/

EthicalSecondaryDegree

Nodejs

No description

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

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.16742014774003766","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"aW1wb3J0IGFwcHYxIGZyb20gJy4vYXBwdjEnOwoKY29uc29sZS5sb2coJ0hlbGxvIE5vZGUuanMgcHJvamVjdC4nKTsKCmNvbnNvbGUubG9nKCdNZXJoYWJhIER1bnlhYScpOwoKZnVuY3Rpb24gYWRkKHgsIHkgPSAxMCkgewoKICAgIHJldHVybiB4ICsgeTsKfQoKYXN5bmMgZnVuY3Rpb24gd3JpdGVMb2cobXNnKXsKCiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCk9PnsKCiAgICAgICAgc2V0VGltZW91dCgoKT0+cmVzb2x2ZShtc2cpLCA4MDAwKTsKICAgIH0pOwp9Cgphc3luYyBmdW5jdGlvbiBhcHAoKXsKCiAgICAvL2FwcHYxKCk7CgogICAgY29uc3QgYTEgPSBhd2FpdCB3cml0ZUxvZyhhZGQoNDApKTsKCiAgICBjb25zb2xlLmxvZyhhMSk7Cn0KCmFwcCgpOw=="},"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
import appv1 from './appv1';

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

console.log('Merhaba Dunyaa');

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();

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

    console.log(a1);
}

app();
node v10.16.0