diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..55712c1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} \ No newline at end of file diff --git a/@types/custom.d.ts b/src/@types/custom.d.ts similarity index 100% rename from @types/custom.d.ts rename to src/@types/custom.d.ts diff --git a/GraphQL/resolvers/index.ts b/src/GraphQL/resolvers/index.ts similarity index 100% rename from GraphQL/resolvers/index.ts rename to src/GraphQL/resolvers/index.ts diff --git a/GraphQL/schema/Test.gql b/src/GraphQL/schema/Test.gql similarity index 100% rename from GraphQL/schema/Test.gql rename to src/GraphQL/schema/Test.gql diff --git a/GraphQL/schema/index.ts b/src/GraphQL/schema/index.ts similarity index 100% rename from GraphQL/schema/index.ts rename to src/GraphQL/schema/index.ts diff --git a/GraphQL/server.ts b/src/GraphQL/server.ts similarity index 94% rename from GraphQL/server.ts rename to src/GraphQL/server.ts index fa8fcd7..32751ea 100644 --- a/GraphQL/server.ts +++ b/src/GraphQL/server.ts @@ -1,7 +1,7 @@ 'use strict'; import express from 'express'; //express import { graphqlHTTP } from 'express-graphql'; -import { config } from '../config'; +import { config } from '../../config'; import schema from './schema'; const server = express.Router();//Router de Express diff --git a/controllers/controllerGraphQL/index.ts b/src/controllers/controllerGraphQL/index.ts similarity index 100% rename from controllers/controllerGraphQL/index.ts rename to src/controllers/controllerGraphQL/index.ts diff --git a/index.ts b/src/index.ts similarity index 98% rename from index.ts rename to src/index.ts index 88293c0..34385d9 100644 --- a/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ import { useServer } from 'graphql-ws/lib/use/ws'; import { execute, subscribe } from 'graphql'; import GraphQLserver from './GraphQL/server';// Server of GraphQL, import schema from './GraphQL/schema'; -import { config } from './config'; +import { config } from '../config'; import apiRouter from './routes'; diff --git a/models/index.ts b/src/models/index.ts similarity index 100% rename from models/index.ts rename to src/models/index.ts diff --git a/routes/index.ts b/src/routes/index.ts similarity index 100% rename from routes/index.ts rename to src/routes/index.ts diff --git a/tests/server/index.test.ts b/src/tests/server/index.test.ts similarity index 100% rename from tests/server/index.test.ts rename to src/tests/server/index.test.ts diff --git a/webpack.config.dev.ts b/webpack.config.dev.ts index 282c98f..034aeb3 100644 --- a/webpack.config.dev.ts +++ b/webpack.config.dev.ts @@ -13,7 +13,7 @@ const resolvePath = (...args) => path.resolve(ROOT_DIR, ...args); const BUILD_DIR = resolvePath('build'); const config = { - entry: './index.ts', + entry: './src/index.ts', target: 'node', watch: true, externals: [nodeExternals()], diff --git a/webpack.config.ts b/webpack.config.ts index ad384f9..cdd00b5 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -13,7 +13,7 @@ const resolvePath = (...args) => path.resolve(ROOT_DIR, ...args); const BUILD_DIR = resolvePath('build'); const config = { - entry: './index.ts', + entry: './src/index.ts', target: 'node', externals: [nodeExternals()], output: {