Skip to content

Commit

Permalink
remove config path
Browse files Browse the repository at this point in the history
  • Loading branch information
gladwindos committed Mar 22, 2024
1 parent 8c191fc commit 687a849
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 3 additions & 1 deletion packages/cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const startServerCommand = (program: Command) => {
"Watch the config file for changes and restart the server",
)
.action((options) => {
const { config, watch } = options;

try {
startServer(options.config, options.watch);
startServer(config, watch);
} catch (error) {
console.error(error);
}
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/commands/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ export const validateConfigCommand = (program: Command) => {
"gateweaver",
)
.action((options) => {
const { config } = options;

try {
parseConfig(options.config);
parseConfig(config);
console.log("✅ Config file is valid");
} catch (error) {
if (error instanceof InvalidConfigError) {
Expand Down
6 changes: 0 additions & 6 deletions packages/server/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { setupEndpoints } from "./setup/setup-endpoints";
export const createRouter = (config: Config): Router => {
const router = Router();

if (process.env.NODE_ENV === "development") {
router.get("/config", (_, res) => {
res.send(config);
});
}

setupEndpoints(router, config);

return router;
Expand Down

0 comments on commit 687a849

Please sign in to comment.