comment out https for now
This commit is contained in:
		
							parent
							
								
									db3b267657
								
							
						
					
					
						commit
						9265777caf
					
				
							
								
								
									
										15
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								index.js
									
									
									
									
									
								
							| @ -2,7 +2,7 @@ | ||||
| 
 | ||||
| require('dotenv').config(); | ||||
| const express = require('express'); | ||||
| var https = require('https'); | ||||
| //var https = require('https');
 | ||||
| var bodyParser = require('body-parser'); | ||||
| const server = express(); | ||||
| const pg = require('pg'); | ||||
| @ -10,14 +10,15 @@ var fs = require('fs'); | ||||
| var readline = require('readline'); | ||||
| 
 | ||||
| //-----------------------------point to ssl info------------------------------------
 | ||||
| var options = { | ||||
|     key: fs.readFileSync(process.env.wd + 'key.pem'), | ||||
|     cert: fs.readFileSync(process.env.wd + 'cert.pem'), | ||||
|     passprase: [] | ||||
| }; | ||||
| //var options = {
 | ||||
| //    key: fs.readFileSync(process.env.wd + 'key.pem'),
 | ||||
| //    cert: fs.readFileSync(process.env.wd + 'cert.pem'),
 | ||||
| //    passprase: []
 | ||||
| //};
 | ||||
| 
 | ||||
| //-----------------------------create server process--------------------------------
 | ||||
| https.createServer(options, server).listen(process.env.nodeport, () => { | ||||
| //https.createServer( /*options,*/ server).listen(process.env.nodeport, () => {
 | ||||
| server.listen(process.env.nodeport, () => { | ||||
|     console.log('started on ' + process.env.nodeport) | ||||
| }); | ||||
| 
 | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| curl -H "Content-Type: application/json" -X GET -d@./routes/baseline/req.json https://localhost:8082/baseline --insecure | ||||
| curl -H "Content-Type: application/json" -X GET -d@./routes/baseline/req.json http://localhost:8082/baseline | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| curl -H "Content-Type: application/json" -X GET -d@./routes/scale/req_dcard.json https://localhost:8082/scale --insecure | ||||
| curl -H "Content-Type: application/json" -X GET -d@./routes/scale/req_dcard.json http://localhost:8082/scale | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user