Files
42_INT_14_transcendence/notes_hugo.md
2022-10-09 15:04:09 +02:00

727 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);
});