bun-types
Version:
Type definitions and documentation for Bun, an incredibly fast JavaScript runtime
22 lines (17 loc) • 855 B
Markdown
In your project folder root (where `package.json` is):
```bash
$ bun bun ./entry-point-1.js ./entry-point-2.jsx
$ bun dev
```
By default, `bun dev` will look for any HTML files in the `public` directory and serve that. For browsers navigating to the page, the `.html` file extension is optional in the URL, and `index.html` will automatically rewrite for the directory.
Here are examples of routing from `public/` and how they’re matched:
| Dev Server URL | File Path |
|----------------|-----------|
| /dir | public/dir/index.html |
| / | public/index.html |
| /index | public/index.html |
| /hi | public/hi.html |
| /file | public/file.html |
| /font/Inter.woff2 | public/font/Inter.woff2 |
| /hello | public/index.html |
If `public/index.html` exists, it becomes the default page instead of a 404 page, unless that pathname has a file extension.