This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tsConfigPathFile = require("./tsconfig.paths.json") | |
const tsConfig = require("./tsconfig.json") | |
const tsConfigPaths = require("tsconfig-paths") | |
tsConfigPaths.register({ | |
baseUrl: tsConfig.compilerOptions.outDir, | |
paths: tsConfigPathFile.compilerOptions.paths | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"dev": "nodemon --exec ts-node -r tsconfig-paths/register src/index.ts", | |
"build": "tsc -p tsconfig.json", | |
"prestart": "rm -rf ./dist && yarn build", | |
"start": "node dist/index.js" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": "./tsconfig.paths.json", | |
"compilerOptions": { | |
"module": "Commonjs", | |
"target": "es5", | |
"sourceMap": true, | |
"allowJs": true, | |
"outDir": "./dist" | |
}, | |
"exclude": ["node_modules"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "./tsconfig.paths.json", | |
"compilerOptions": { | |
"module": "Commonjs", | |
"target": "es5", | |
"sourceMap": true, | |
"allowJs": true | |
}, | |
"exclude": ["node_modules"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"paths": { | |
"src/*": ["src/*"] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TEST_TEXT } from "src/constants" | |
console.log("hello world", TEST_TEXT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"module": "Commonjs", | |
"target": "es5", | |
"sourceMap": true, | |
"allowJs": true, | |
"baseUrl": ".", | |
"paths": { | |
"src/*": ["src/*"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TEST_TEXT } from "./constants" | |
console.log("hello world", TEST_TEXT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TEST_TEXT } from "./constants" | |
console.log("hello world", TEST_TEXT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GraphQLServer } from "graphql-yoga" | |
import logger from "morgan" | |
import cors from "cors" | |
import helmet from "helmet" | |
const createServer = async () => { | |
const server = new GraphQLServer({}) | |
// middleware 추가 | |
server.express.use(logger("dev")) | |
server.express.use(cors()) |
NewerOlder