I am a complete novice at programming, but I have this code that works maybe once every 5 times and it prints my CSS code as text. I do not wish to use async or promises.
const server = http.createServer(function(recieve, respond){
let count = 0
respond.writeHead(200);
let manager = function (err, data){
respond.write(data);
count += 1
if (count === 2){
respond.end()
}}
fs.readFile('index.html',manager)
fs.readFile('styles.css',manager)