http
.createServer((req, res) => {
- fs.readFile('index.htm', 'utf-8', (err, content) => {
+ fs.readFile('index.html', 'utf-8', (err, content) => {
if (err) {
- console.log('We cannot open "index.htm" file.')
+ console.log('We cannot open "index.html" file.')
}
res.writeHead(200, {
</configuration>
```
-### Caddy
+### Caddy v2
+
+```
+try_files {path} /
+```
+
+### Caddy v1
```
rewrite {
http
.createServer((req, res) => {
- fs.readFile('index.htm', 'utf-8', (err, content) => {
+ fs.readFile('index.html', 'utf-8', (err, content) => {
if (err) {
- console.log('We cannot open "index.htm" file.')
+ console.log('We cannot open "index.html" file.')
}
res.writeHead(200, {
</configuration>
```
-### Caddy
+### Caddy v2
+
+```
+try_files {path} /
+```
+
+### Caddy v1
```
rewrite {