Skip to content

Commit

Permalink
refactor: place servers in separate directories
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveVanOpstal committed Jul 11, 2016
1 parent 08747c0 commit cc14da2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions config/webpack/server/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ module.exports = webpackMerge(commonConfig, {
target: 'node',

entry: {
'static-server': helpers.root('src/server/static-server.ts'),
'match-server': helpers.root('src/server/match-server.ts')
'static-server': helpers.root('src/server/static/server.ts'),
'match-server': helpers.root('src/server/match/server.ts'),
},

output: {path: helpers.root('dist/server'), filename: '[name].js'},
Expand Down
4 changes: 2 additions & 2 deletions config/webpack/server/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module.exports = webpackMerge(commonConfig, {
target: 'node',

entry: {
'static-server': helpers.root('src/server/static-server.ts'),
'match-server': helpers.root('src/server/match-server.ts')
'static-server': helpers.root('src/server/static/server.ts'),
'match-server': helpers.root('src/server/match/server.ts'),
},

output: {path: helpers.root('dist/server'), filename: '[name].js'},
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/server/match.ts → src/server/match/match.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {parallel, waterfall} from 'async';
import {IncomingMessage, ServerResponse} from 'http';

import {settings} from '../../config/settings';
import {settings} from '../../../config/settings';

import {HostResponse, HttpError, Server} from './server';
import {HostResponse, HttpError, Server} from '../server';
import {Summoner} from './summoner';

let config = {
Expand Down
4 changes: 2 additions & 2 deletions src/server/match-server.ts → src/server/match/server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {IncomingMessage, ServerResponse} from 'http';

import {settings} from '../../config/settings';
import {settings} from '../../../config/settings';
import {Server, getPathname, getQuery} from '../server';

import {Match} from './match';
import {Server, getPathname, getQuery} from './server';
import {Summoner} from './summoner';

let server =
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions src/server/summoner.ts → src/server/match/summoner.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {IncomingMessage, ServerResponse} from 'http';

import {settings} from '../../config/settings';

import {HostResponse, Server} from './server';
import {settings} from '../../../config/settings';
import {HostResponse, Server} from '../server';

export class Summoner {
constructor(private server: Server) {}
Expand Down
5 changes: 2 additions & 3 deletions src/server/static-server.ts → src/server/static/server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {IncomingMessage, ServerResponse} from 'http';

import {settings} from '../../config/settings';

import {HostResponse, Server, getPathname} from './server';
import {settings} from '../../../config/settings';
import {HostResponse, Server, getPathname} from '../server';

let server = new Server(settings.staticServer.host, settings.staticServer.port);

Expand Down

0 comments on commit cc14da2

Please sign in to comment.