Commit ae696ca1 authored by Aral Balkan's avatar Aral Balkan
Browse files

Restart server on middleware updates

parent add30a29
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [17.0.2] - 2021-04-29
### Fixed
- Server now automatically restarts when middleware (in the _.middleware/_ folder of your project) is updated.
## [17.0.1] - 2021-04-27
### Fixed
......
......@@ -1343,6 +1343,13 @@ class Site {
this.log(` 🐁 ❨site.js❩ Wildcard route change: ${clr(`${this.prettyFileWatcherEvent(event)}`, 'green')} (${clr(file, 'cyan')}).`)
this.log('\n 🐁 ❨site.js❩ Requesting restart…\n')
await this.restartServer()
} else if (file.includes('/.middleware')) {
//
// Middleware route change.
//
this.log(` 🐁 ❨site.js❩ Middleware change: ${clr(`${this.prettyFileWatcherEvent(event)}`, 'green')} (${clr(file, 'cyan')}).`)
this.log('\n 🐁 ❨site.js❩ Requesting restart…\n')
await this.restartServer()
} else if (file.includes('/.generated') && !this.generatedContentExists && fs.existsSync(this.generatedStaticFilesDirectory)) {
//
// Generated folder has been added.
......
{
"name": "@small-tech/site.js",
"version": "17.0.1",
"version": "17.0.2",
"description": "Small Web construction set.",
"keywords": [
"web server",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment