This repo can help you to learn how browser loads scripts and files, builds dom, emits DOMContentLoaded etc.
npm install
npm run start:dev
export const adminCredentials: Credentials = {
login: 'admin',
password: 'admin'
};
<script src="/resources/a.js?delay=2000&log=helloworld"></script>
<h1 class="a">A</h1>
<link rel="stylesheet" href="/resources/a.css?delay=3000">
-
delay (milliseconds) is used to simulate large files or custom network lags, you can change it for any request and see what happens.
-
log parameter will make app server to console.log your message.
app.use(auth());
This repo is also a simple example of how basic access authentication works.