Skip to content

Commit

Permalink
second commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chakri642 committed Jan 9, 2024
1 parent 9f5cd28 commit 9e4a3dc
Show file tree
Hide file tree
Showing 182 changed files with 100,033 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ COPY package.json .
COPY . .
RUN npm install
EXPOSE 5500
CMD ["node","app.js","./on_demand.yaml"]
CMD ["node","app.js","./v1.yaml"]
13 changes: 8 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const express = require("express");
const log = require("./utils/logger");
const app = express();
var https = require('https');
var http = require('http');
const config = require("./utils/config.js");
const router = require("./routes/route");

Expand Down Expand Up @@ -197,7 +197,7 @@ async function createCollectionItem(requestName, requestPayload, method) {
name: `${requestName}`,
request: {
header: createRequestHeader(),
url: `https://localhost:5500/${requestName}`,
url: `http://localhost:5500/${requestName}`,
method: method,
body: {
mode: "raw",
Expand Down Expand Up @@ -232,15 +232,18 @@ async function generatePostmanCollecion(postmanCollection, generateCollection) {

var folderPath;
async function createInstructionSet(file) {
console.log("createInstructionSet");
try {
if (args[0]) {

const path = args[0];
const file = `./${path}/${path}.yaml`;
// const path = args[0];
// const file = `./${path}/${path}.yaml`;
const file = `server.yaml`;

startUp(file);
}
else{
console.log("build.yaml file not provided");
const buildFile = await baseYMLFile(file);
const examples = buildFile["x-examples"];
const paths = buildFile["paths"];
Expand Down Expand Up @@ -332,7 +335,7 @@ async function startUp(file) {
};
app.use(express.json());
const logger = log.init();
https.createServer(options, app).listen(server.port, () => {
http.createServer(options, app).listen(server.port, () => {
logger.info(`This app is running on port number : ${server.port}`);
});
// app.listen(server.port, () => {
Expand Down
1 change: 1 addition & 0 deletions b2b_collection.json

Large diffs are not rendered by default.

Loading

0 comments on commit 9e4a3dc

Please sign in to comment.