Skip to content

Commit 4f18812

Browse files
author
Amiel Christian Mala-ay
committed
Replaced single quotes with double quotes
1 parent b3ddab2 commit 4f18812

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

examples/with-netlify/src/handler/handler.mts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { server } from "@stackpress/ingest/fetch";
2-
import pages from "../routes/pages";
3-
import user from "../routes/user";
4-
import tests from "../routes/tests";
5-
import hooks from "../routes/hooks";
1+
import { server } from '@stackpress/ingest/fetch';
2+
import pages from '../routes/pages';
3+
import user from '../routes/user';
4+
import tests from '../routes/tests';
5+
import hooks from '../routes/hooks';
66

77
export async function handler(event: any, context: any) {
88
const app = server();

examples/with-netlify/src/routes/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ route.on('error', function Error(req, res) {
4444
const html = [ `<h1>${res.error}</h1>` ];
4545
const stack = res.stack?.map((log, i) => {
4646
const { line, char } = log;
47-
const method = log.method.replace(/</g, "&lt;").replace(/>/g, "&gt;");
48-
const file = log.file.replace(/</g, "&lt;").replace(/>/g, "&gt;");
47+
const method = log.method.replace(/</g, '&lt;').replace(/>/g, '&gt;');
48+
const file = log.file.replace(/</g, '&lt;').replace(/>/g, '&gt;');
4949
return `#${i + 1} ${method} - ${file}:${line}:${char}`;
5050
}) || [];
5151
html.push(`<pre>${stack.join('<br><br>')}</pre>`);

examples/with-netlify/src/routes/pages.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { router } from "@stackpress/ingest/fetch";
1+
import { router } from '@stackpress/ingest/fetch';
22

33
const template = `
44
<!DOCTYPE html>
@@ -24,14 +24,14 @@ const route = router();
2424
/**
2525
* Home page
2626
*/
27-
route.get("/", function HomePage(req, res) {
28-
res.setHTML("<h1>Hello, World!</h1><p>from Netlify</p>");
27+
route.get('/', function HomePage(req, res) {
28+
res.setHTML('<h1>Hello, World!</h1><p>from Netlify</p>');
2929
});
3030

3131
/**
3232
* Login page
3333
*/
34-
route.get("/login", function Login(req, res) {
34+
route.get('/login', function Login(req, res) {
3535
//send the response
3636
res.setHTML(template.trim());
3737
});

examples/with-netlify/src/routes/tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ route.get('/__sse__', function SSE(req, res) {
6363
.set('Access-Control-Allow-Origin', '*');
6464

6565
let timerId: any;
66-
const msg = new TextEncoder().encode("data: hello\r\n\r\n");
66+
const msg = new TextEncoder().encode('data: hello\r\n\r\n');
6767
res.setBody('text/event-stream', new ReadableStream({
6868
start(controller) {
6969
timerId = setInterval(() => {

0 commit comments

Comments
 (0)