sprucehttp_sjs 1.0.0

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/index.js +27 -0
  2. package/package.json +27 -0
package/index.js ADDED
@@ -0,0 +1,27 @@
1
+ module.exports = {
2
+ streamMode: function() {
3
+ process.send({
4
+ type: 'streamMode'
5
+ });
6
+ },
7
+ writeStatusLine: function(statusCode, reasonPhrase) {
8
+ process.send({
9
+ type: 'status',
10
+ statusCode,
11
+ reasonPhrase
12
+ });
13
+ },
14
+ writeHeader: function(name, value) {
15
+ process.send({
16
+ type: 'status',
17
+ name,
18
+ value
19
+ });
20
+ },
21
+ writeData: function(data) {
22
+ process.send({
23
+ type: 'data',
24
+ data: Buffer.from(data).toString('base64')
25
+ });
26
+ }
27
+ }
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "sprucehttp_sjs",
3
+ "version": "1.0.0",
4
+ "description": "Module for responding to requests within SpruceHTTP in an SJS file",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "http",
11
+ "server",
12
+ "https",
13
+ "spruce",
14
+ "sprucehttp"
15
+ ],
16
+ "homepage": "https://stibarc.dev/spruce/",
17
+ "bugs": {
18
+ "url": "https://stibarc.dev/spruce/reportbug/",
19
+ "email": "herronjo@stibarc.dev"
20
+ },
21
+ "author": {
22
+ "name": "Joshua Herron",
23
+ "email": "herronjo@stibarc.dev",
24
+ "url": "https://stibarc.dev"
25
+ },
26
+ "license": "Copyright (c) STiBaRC LLC. All rights reserved."
27
+ }