From 74811c0dd58dada1ae838226ae29af7d6c058437 Mon Sep 17 00:00:00 2001 From: mrjones-plip Date: Fri, 19 Jan 2024 13:08:16 -0800 Subject: [PATCH] move publish.js to script dir, delete dist dir --- dist/index.js | 18 ------------------ package.json | 2 +- {dist => scripts}/publish.js | 0 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 dist/index.js rename {dist => scripts}/publish.js (100%) diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index faba91f9..00000000 --- a/dist/index.js +++ /dev/null @@ -1,18 +0,0 @@ -// thanks https://riptutorial.com/node-js/example/1169/hello-world-http-server ! - -const http = require('http'); // Loads the http module - -http.createServer((request, response) => { - - // 1. Tell the browser everything is OK (Status code 200), and the data is in plain text - response.writeHead(200, { - 'Content-Type': 'text/plain' - }); - - // 2. Write the announced text to the body of the page - response.write('Hello, World!\n'); - - // 3. Tell the server that all of the response headers and body have been sent - response.end(); - -}).listen(3000); // 4. Tells the server what port to be on diff --git a/package.json b/package.json index 4c43d72f..b29d9625 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "build": "npm run cp-package-json && npx tsc", "start": "node dist/index.js", "dev": "tsc-watch --onSuccess \"node dist/index.js\"", - "publish": "node dist/publish.js" + "publish": "node scripts/publish.js" }, "repository": { "type": "git", diff --git a/dist/publish.js b/scripts/publish.js similarity index 100% rename from dist/publish.js rename to scripts/publish.js