Files
42_INT_14_transcendence/notes_hugo.md
2022-10-08 19:37:17 +02:00

616 B

node.js & postgresql

code synchrone / asynchrone :

// bocking code
var content = fs.readFileSync('MyFile.txt');
console.log('my file :', content);

// non-bocking code
fs.readFile('MyFile.txt', (err, content) => {
	if (err) {
		throw err;
	}
	console.log('my file :', content);
});