Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 3 additions & 1 deletion app.arc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
begin-app

@http
get /
/
method get
src .

@tables
data
Expand Down
38 changes: 0 additions & 38 deletions src/http/get-index/index.ts → index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,3 @@ export async function handler (req: object) {
}
}

// Example responses

/* Forward requester to a new path
export async function handler (req: object) {
return {
statusCode: 302,
headers: {
'location': '/about',
'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0'
}
}
}
*/

/* Respond with successful resource creation
export async function handler (req: object) {
return {
statusCode: 201,
headers: {
'content-type': 'application/json; charset=utf8',
'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0'
},
body: JSON.stringify({ok: true})
}
}
*/

/* Deliver client-side JS
export async function handler (req: object) {
return {
headers: {
'content-type': 'text/javascript; charset=utf8',
'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0'
},
body: 'console.log("Hello world!")',
}
}
*/
Loading