Skip to content

Switches to configurable file paths. "Simplest" project with least amount of folders. #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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