Skip to content

Commit

Permalink
feat: add start script
Browse files Browse the repository at this point in the history
  • Loading branch information
arsaizdihar committed Mar 29, 2024
1 parent ec4be17 commit e07405c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
es2021: true,
},
extends: ['love', 'plugin:prettier/recommended'],
ignorePatterns: ['.eslintrc.js', 'node_modules/'],
ignorePatterns: ['.eslintrc.js', 'node_modules/', 'drizzle/'],
overrides: [
{
env: {
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drizzle
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"displayName": "HMIF App API",
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts",
"dev": "tsx watch src/index.ts",
"db:migrations": "drizzle-kit generate:pg --config drizzle.config.ts",
"db:migrate": "tsx src/db/migrate.ts",
Expand Down
8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { serve } from '@hono/node-server';
import { swaggerUI } from '@hono/swagger-ui';
import { OpenAPIHono } from '@hono/zod-openapi';
import fs from 'fs';
import { cors } from 'hono/cors';
import { logger } from 'hono/logger';
import packageJson from '../package.json';
import path from 'path';
import { fileURLToPath } from 'url';
import { env } from './configs/env.config';
import { apiRouter } from './controllers/api.controller';

const dirname = path.dirname(fileURLToPath(import.meta.url));
const packageJson = JSON.parse(
fs.readFileSync(path.join(dirname, '../package.json'), 'utf-8'),
);
const app = new OpenAPIHono();

app.use(logger());
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"./src/*"
]
},
"baseUrl": "."
"baseUrl": ".",
"skipLibCheck": true
}
}

0 comments on commit e07405c

Please sign in to comment.