Migrating to Svelte User management not done. Footer not done Nav user management icon not positioned correctly
This commit is contained in:
parent
ac83d0702c
commit
a21186f362
55 changed files with 2126 additions and 387 deletions
16
src/routes/blog/index.json.js
Normal file
16
src/routes/blog/index.json.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import posts from './_posts.js';
|
||||
|
||||
const contents = JSON.stringify(posts.map(post => {
|
||||
return {
|
||||
title: post.title,
|
||||
slug: post.slug
|
||||
};
|
||||
}));
|
||||
|
||||
export function get(req, res) {
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'application/json'
|
||||
});
|
||||
|
||||
res.end(contents);
|
||||
}
|
||||
Loading…
Reference in a new issue