nv-srv-nd-http-util 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/res.js +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nv-srv-nd-http-util",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "dependencies": {
package/res.js CHANGED
@@ -59,6 +59,14 @@ const reply_html = (res,html)=>{
59
59
  res.writeHead(200, 'OK',{ 'Content-Type': 'text/html'});
60
60
  res.end(html);
61
61
  }
62
+ const reply_js = (res,jscode)=>{
63
+ res.writeHead(200, 'OK',{ 'Content-Type': 'application/javascript'});
64
+ res.end(jscode);
65
+ }
66
+ const reply_css = (res,csscode)=>{
67
+ res.writeHead(200, 'OK',{ 'Content-Type': 'text/css'});
68
+ res.end(csscode);
69
+ }
62
70
 
63
71
  ////
64
72
  const reply_sse = (res)=>{
@@ -116,7 +124,7 @@ module.exports = {
116
124
  ////
117
125
  reply_file,
118
126
  reply_sse,
119
- reply_html,
127
+ reply_html, reply_js,reply_css,
120
128
  pipe_buf_req_to_ws$_with_cb,
121
129
  pipe_buf_req_to_ws$,
122
130
  ////