Skip to content

Commit ce32df4

Browse files
authored
Merge pull request #91 from adorableio/remove-server-code
The server code is meant only for testing/development. Closes #90.
2 parents a84eff4 + 8aaa3e8 commit ce32df4

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

.buildpacks

Lines changed: 0 additions & 2 deletions
This file was deleted.

Procfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ Then, there are several npm scripts that will be useful:
7171
# run the unit tests
7272
npm test
7373

74-
# run a dev server
75-
npm start
76-
7774
# run both a dev server and eslint
7875
npm run dev
7976

77+
# run a dev server
78+
npm run dev:server
79+
80+
# run eslint
81+
npm run dev:lint
82+
8083
# compile the application
8184
npm run build
82-
83-
# run the compiled server
84-
npm run start:prod
8585
```
8686

8787
## Contributing

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
"scripts": {
99
"test": "mocha --exit",
1010
"build": "babel src/ --out-dir=dist/ --copy-files",
11-
"dev": "concurrently --kill-others --prefix=name --names=server,eslint --prefix-colors=green,magenta \"babel-watch --watch src src/server.js\" \"esw src/ --changed --watch\"",
12-
"start": "babel-node src/server.js",
13-
"start:prod": "node dist/server.js",
14-
"heroku-postbuild": "npm run build",
11+
"dev": "concurrently --kill-others --prefix=name --names=server,eslint --prefix-colors=green,magenta \"npm run dev:server\" \"npm run dev:lint\"",
12+
"dev:server": "babel-watch --watch src test/server.js",
13+
"dev:lint": "esw src/ --changed --watch",
1514
"prepublishOnly": "npm run build"
1615
},
1716
"author": "",

test/integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import supertest from 'supertest';
22
import { expect } from 'chai';
33
import { subClass } from 'gm';
4-
import webserver from '../src/server';
4+
import webserver from './server';
55

66
const im = subClass({ imageMagick: true });
77

src/server.js renamed to test/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const faviconPath = path.join(basePath, 'src', 'favicon.ico');
1010

1111
app.use(favicon(faviconPath));
1212

13-
import avatarsRoutes from './routes/avatars';
13+
import avatarsRoutes from '../src/routes/avatars';
1414

1515
app.use('/avatars', avatarsRoutes);
1616

0 commit comments

Comments
 (0)