Skip to content

Commit

Permalink
fix: fix a bug of npx command not working
Browse files Browse the repository at this point in the history
  • Loading branch information
yujiosaka committed Oct 29, 2023
1 parent dcad36c commit b754ded
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"types": "dist/index.d.ts",
"main": "dist/index.js",
"bin": {
"cronyx-server": "./dist/server.js"
"cronyx-server": "./dist/bin/cronyx-server.js"
},
"scripts": {
"build": "tsc -p tsconfig.build.json",
"dev": "bun --watch src/server.ts",
"dev": "bun --watch src/index.ts",
"format": "prettier **/*.{md,ts,cts,json} -w",
"format:check": "prettier **/*.{md,ts,cts,json} --check",
"lint": "eslint **/*.{ts,cts} --quiet",
Expand Down
2 changes: 2 additions & 0 deletions src/bin/cronyx-server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/env bun
import "..";
2 changes: 1 addition & 1 deletion src/server.ts → src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CronyxServerError } from "./error";
import Source from "./source";
import { log, parseOptions, parseSource } from "./util";

const app = new Elysia({ name: "cronyx-server" })
const app = new Elysia()
.onAfterHandle(({ request }) => {
log(`${request.method} ${new URL(request.url).pathname}`);
})
Expand Down

0 comments on commit b754ded

Please sign in to comment.