This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
public IConfiguration Configuration { get; } | |
public Startup() | |
{ | |
var builder = new ConfigurationBuilder() | |
.AddEnvironmentVariables(); | |
Configuration = builder.Build(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"<div>Helloe</div>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taskHandler = async (task) => { | |
try { | |
const handler = await import(`handlers/${task.taskId}`); | |
return await handler.execute(task); | |
} | |
catch { | |
return -1; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taskHandler = async (task) => { | |
try { | |
log.info("Executing {taskId}", { taskId: task.taskId }); | |
const handler = await import(`handlers/${task.taskId}`); | |
return await handler.execute(task); | |
} | |
catch (error) { | |
log.error(error, "Task Handler {taskId} failed", { taskId: task.taskId }); | |
return -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taskHandler = async (task) => { | |
try { | |
const start = Date.now(); | |
log.info("Executing {taskId}", { taskId: task.taskId }); | |
const handler = await import(`handlers/${task.taskId}`); | |
const result = await handler.execute(task); | |
const end = Date.now(); | |
log.info("Task Handler {taskId} succeeded in {time}ms", { taskId: task.taskId, time: end - start }); | |
return result; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const apiCall = async () => { | |
let response = await fetch("https://jsonplaceholder.typicode.com/todos/1"); | |
let json = await response.json(); | |
console.log(json) | |
} |
OlderNewer