-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 chore(js-env): Updated eleventy requirements
🎩 NOTES: 🔸Update eleventy config 🔸updated npm deps
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @file simple_dev_server_v1.0.mjs | ||
* @version 1.0.0 | ||
* @description A simple development server for static files | ||
* @license MIT | ||
* @example node simple_dev_server_v1.0.mjs | ||
* @example node simple_dev_server_v1.0.mjs 8890 | ||
*/ | ||
|
||
import express from 'express'; | ||
// import serveIndex from 'serve-index'; | ||
// import path from 'path'; | ||
// import { fileURLToPath } from 'url'; | ||
// import fs from 'fs'; | ||
|
||
const address = '127.0.0.1' | ||
const port = '8089'; | ||
const localserver = express(); | ||
|
||
// Serve static files and directory listing | ||
// if(fs.existsSync(__dirname + '/index.html')) { | ||
// devserver.use( express.static(__dirname) ); | ||
// }else{ | ||
// devserver.use( express.static(`/${__filename}`), serveIndex(__dirname, {'icons': true})); | ||
// } | ||
|
||
localserver.use('/static', express.static( 'src' ) ); | ||
|
||
localserver.listen(port, address, (res,req) => { | ||
console.log(`Server listening on http://${address}:${port}`); | ||
}); |