File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import { ObjectQL } from '@objectql/core' ;
1010import { SqlDriver } from '@objectql/driver-sql' ;
1111import { ObjectLoader , loadModules } from '@objectql/platform-node' ;
12- import { createNodeHandler , createGraphQLHandler } from '@objectql/server' ;
12+ // import { createNodeHandler, createGraphQLHandler } from '@objectql/server';
1313import { createServer } from 'http' ;
1414import * as path from 'path' ;
1515import * as fs from 'fs' ;
@@ -129,10 +129,12 @@ export async function serve(options: {
129129 }
130130
131131 // 3. Create Handler
132- const internalHandler = createNodeHandler ( app ) ;
133- const graphqlHandler = createGraphQLHandler ( app ) ;
132+ // const internalHandler = createNodeHandler(app);
133+ // const graphqlHandler = createGraphQLHandler(app);
134+ throw new Error ( 'This command is deprecated. Please use "objectstack serve" instead.' ) ;
134135
135136 // 4. Start Server
137+ /*
136138 const server = createServer(async (req, res) => {
137139 // Serve API Docs at Root (Default)
138140 if (req.method === 'GET' && (req.url === '/' || req.url === '/docs' || req.url === '/docs/')) {
@@ -191,4 +193,5 @@ export async function serve(options: {
191193 };
192194
193195 tryListen(startPort);
196+ */
194197}
Original file line number Diff line number Diff line change 99import { ObjectQL } from '@objectql/core' ;
1010import { SqlDriver } from '@objectql/driver-sql' ;
1111import { ObjectLoader , loadModules } from '@objectql/platform-node' ;
12- import { createNodeHandler } from '@objectql/server' ;
12+ // import { createNodeHandler } from '@objectql/server';
1313import { createServer } from 'http' ;
1414import * as path from 'path' ;
1515import * as fs from 'fs' ;
@@ -103,8 +103,10 @@ export async function start(options: StartOptions) {
103103 }
104104
105105 // Create Handler
106- const handler = createNodeHandler ( app ) ;
106+ // const handler = createNodeHandler(app);
107+ throw new Error ( 'This command is deprecated. Please use "objectstack serve" instead.' ) ;
107108
109+ /*
108110 // Start Server
109111 const server = createServer(async (req, res) => {
110112 await handler(req, res);
@@ -124,4 +126,5 @@ export async function start(options: StartOptions) {
124126 });
125127 });
126128 });
129+ */
127130}
Original file line number Diff line number Diff line change 99 { "path" : " ../../foundation/types" },
1010 { "path" : " ../../foundation/plugin-validator" },
1111 { "path" : " ../../foundation/core" },
12- { "path" : " ../../runtime/server " },
12+ { "path" : " ../../protocols/rest " },
1313 { "path" : " ../../foundation/platform-node" },
1414 { "path" : " ../../drivers/sql" }
1515 ]
You can’t perform that action at this time.
0 commit comments