@nattyjs/express 0.0.1-beta.50 → 0.0.1-beta.51

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.
package/dist/index.cjs CHANGED
@@ -63,7 +63,8 @@ function parseCookies(value) {
63
63
  function requestHandler(config) {
64
64
  return async (request, response) => {
65
65
  const httpHandler = new core.HttpHandler();
66
- const url = config.framework == common.FrameworkType.Firebase ? `http://localhost:3000/api${request.url}` : `http://localhost:3000${request.url}`;
66
+ const apiPrefix = `/${common.commonContainer.nattyConfig.api?.rootPath}`;
67
+ const url = config.framework == common.FrameworkType.Firebase ? `http://localhost:3000/api${request.url}` : `http://localhost:3000${apiPrefix}${request.url}`;
67
68
  const httpContext = new core.HttpContext(
68
69
  {
69
70
  url,
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import cors from 'cors';
4
4
  import compression from 'compression';
5
5
  import { HttpHandler, HttpContext } from '@nattyjs/core';
6
- import { GET, FrameworkType, commonContainer, getPort } from '@nattyjs/common';
6
+ import { GET, commonContainer, FrameworkType, getPort } from '@nattyjs/common';
7
7
 
8
8
  async function getRequestBodyInfo(request) {
9
9
  const contentType = request.headers["content-type"];
@@ -54,7 +54,8 @@ function parseCookies(value) {
54
54
  function requestHandler(config) {
55
55
  return async (request, response) => {
56
56
  const httpHandler = new HttpHandler();
57
- const url = config.framework == FrameworkType.Firebase ? `http://localhost:3000/api${request.url}` : `http://localhost:3000${request.url}`;
57
+ const apiPrefix = `/${commonContainer.nattyConfig.api?.rootPath}`;
58
+ const url = config.framework == FrameworkType.Firebase ? `http://localhost:3000/api${request.url}` : `http://localhost:3000${apiPrefix}${request.url}`;
58
59
  const httpContext = new HttpContext(
59
60
  {
60
61
  url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nattyjs/express",
3
- "version": "0.0.1-beta.50",
3
+ "version": "0.0.1-beta.51",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "ajayojha <ojhaajay@outlook.com>",
@@ -19,9 +19,9 @@
19
19
  "chokidar": "4.0.3",
20
20
  "cors": "2.8.5",
21
21
  "compression": "1.7.4",
22
- "@nattyjs/core": "0.0.1-beta.50",
23
- "@nattyjs/common": "0.0.1-beta.50",
24
- "@nattyjs/types": "0.0.1-beta.50"
22
+ "@nattyjs/core": "0.0.1-beta.51",
23
+ "@nattyjs/common": "0.0.1-beta.51",
24
+ "@nattyjs/types": "0.0.1-beta.51"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "20.3.1",