concept follow file in category svelte
appears as: following file, following files

This is an excerpt from Manning's book Svelte and Sapper in Action.
To configure use of ESLint, create the following file in the top directory of each Svelte app:
@sapperdirectory--This directory and its subdirectories contain files provided or generated by Sapper that should not be modified.
app.mjs--This file exports the Sapper API functions, includingserver.mjs--This file exports the Sappermiddlewarefunction that processes HTTP requests sent to the app. It is called byserver.js, which was described earlier.service-worker.js--This file exports the following constants used bysrc/ service-worker.js, described earlier.internaldirectory--This contains the following files:
App.svelte--This displays the current page, or an error page if there is an error.error.svelte--This is the default error page component that is used ifsrc/routes/_error.svelteis not found. It displays the status code and an error message. It also displays a stack trace if theNODE_ENVenvironment variable is set todevelopment.layout.svelte--This is the default layout component that is used ifsrc/ routes/_layout.svelteis not found. It only contains a<slot>for rendering the current page component.manifest-client.mjs--This provides data about components and routes (pages). It is used byapp.mjs, which was described earlier.manifest-server.mjs--This provides data about server routes (see chapter 17) and pages. It is used byserver.mjs, which was described earlier.shared.mjs--This currently doesn’t seem to provide anything useful. Perhaps it will have some purpose in the future.
const send = require('@polka/send-type'); const {ObjectId} = require('mongodb'); #1 import {getCollection} from '../_helpers'; export async function del(req, res) { #2 const {categoryId} = req.params; try { const collection = await getCollection(); const result = await collection.deleteOne({_id: ObjectId(categoryId)}); if (result.deletedCount === 0) { send(res, 404, `no category with id ${categoryId} found`); } else { res.end(); } } catch (e) { console.error( 'categories/[categoryId]/index.json.js del:', e ); send(res, 500, {error: e}); } } export async function put(req, res) { #3 const {categoryId} = req.params; const replacement = req.body; delete replacement._id; #4 try { const collection = await getCollection(); const result = await collection.replaceOne( {_id: ObjectId(categoryId)}, replacement ); const [obj] = result.ops; obj._id = categoryId; #5 res.end(JSON.stringify(obj)); } catch (e) { console.error( 'categories/[categoryId]/index.json.js put:', e ); send(res, 500, {error: e}); } }