From 5534179990a6dfd2ffa2c959f7637788752cf3f3 Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Wed, 23 Feb 2022 08:25:34 -0800 Subject: [PATCH] refactor (#2): separate static files from functions --- netlify/functions/{ => data}/jokes.json | 0 netlify/functions/joke.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename netlify/functions/{ => data}/jokes.json (100%) diff --git a/netlify/functions/jokes.json b/netlify/functions/data/jokes.json similarity index 100% rename from netlify/functions/jokes.json rename to netlify/functions/data/jokes.json diff --git a/netlify/functions/joke.js b/netlify/functions/joke.js index a07759a..826e21b 100644 --- a/netlify/functions/joke.js +++ b/netlify/functions/joke.js @@ -1,5 +1,5 @@ // Jokes provided from the lovely folks at https://icanhazdadjoke.com -import jokes from './jokes.json' +import jokes from './data/jokes.json' export const handler = async () => { // Generates a random index based on the length of the jokes array