I have uploaded a site, but the .js file won’t execute. The path for the file is ./assets/js/index.js; it is pulling from a Github repo. The contents are:
const handler = async () => {
return {
statusCode: 200,
headers: { "Content-Type": "text/plain" },
body: "paul".toUpperCase(),
};
};
module.exports = { handler };
Any idea why the JS isn’t executing?
Thank you!
@pmdenlinger Separate from @dig ’s notes, if that file is intended to form part of a “server response” see:
Last reviewed by Netlify Support on December 2022
How do I run a server/database at Netlify?
We often get questions about how to run a specific backend server or database at Netlify. Examples of these types of questions include:
How to I get my node HTTP listener to respond to requests?
How do I start Mongo/MySQL/<insert-some-database-here> running on the server?
How can I SSH into my website?
We are here today to answer these questions - and the answer is: you can’t!
What do you m…