Actually run the feathers application

This commit is contained in:
R. Tyler Croy 2018-08-11 14:26:58 -07:00
parent de2b21ab73
commit 44650acd88
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
9 changed files with 368 additions and 13 deletions

2
backend/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
src/*.js
src/*.js.map

View File

@ -0,0 +1,9 @@
{
"host": "0.0.0.0",
"port": 3030,
"public": "../public/",
"paginate": {
"default": 10,
"max": 50
}
}

9
backend/config/test.json Normal file
View File

@ -0,0 +1,9 @@
{
"host": "0.0.0.0",
"port": 3030,
"public": "../public/",
"paginate": {
"default": 10,
"max": 50
}
}

View File

@ -29,6 +29,30 @@
"resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-1.4.4.tgz",
"integrity": "sha512-ZPpzyZA3CPfoa9AuFv3BJUI/ubzaaXixp8T/pqeMFPT6DOaU/6oF7lz1RxwimzfJNna4gy/HByt0EoLSI3BKWg=="
},
"@feathersjs/configuration": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@feathersjs/configuration/-/configuration-2.0.0.tgz",
"integrity": "sha512-ZaByFEu2FC2IrTf1QL4AbFhKlR657GKWkOEUOgNs2Te1MeAA+wskL4uXvmRuELQvdSjk/FoNdJxI8MXFIo5Umw==",
"requires": {
"config": "2.0.1",
"debug": "3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"@feathersjs/errors": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-3.3.0.tgz",
@ -105,12 +129,68 @@
}
}
},
"@types/body-parser": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
"dev": true,
"requires": {
"@types/connect": "3.4.32",
"@types/node": "10.5.8"
}
},
"@types/connect": {
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
"dev": true,
"requires": {
"@types/node": "10.5.8"
}
},
"@types/events": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
"integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
"dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
"dev": true,
"requires": {
"@types/body-parser": "1.17.0",
"@types/express-serve-static-core": "4.16.0",
"@types/serve-static": "1.13.2"
}
},
"@types/express-serve-static-core": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
"dev": true,
"requires": {
"@types/events": "1.2.0",
"@types/node": "10.5.8",
"@types/range-parser": "1.2.2"
}
},
"@types/feathersjs__configuration": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@types/feathersjs__configuration/-/feathersjs__configuration-1.0.1.tgz",
"integrity": "sha512-6ZFaNScNM/s0uN/HB95Xq1ldB+J3E7uq2737IIKm/J5kLfNVwhRTSpAWcD8lakTa6MVzsWgaUAIU7lXcpQj20A==",
"dev": true
},
"@types/feathersjs__express": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@types/feathersjs__express/-/feathersjs__express-1.1.4.tgz",
"integrity": "sha512-cT5wAHnUdMpXBThqRxJR0UteOjU8wdXCUxTXYCnU7x5Cq7sXXlq3fNE+bDmeWqVAXsqSqbN6lPjMxz90NPzPVQ==",
"dev": true,
"requires": {
"@types/express": "4.16.0"
}
},
"@types/feathersjs__feathers": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/feathersjs__feathers/-/feathersjs__feathers-3.0.4.tgz",
@ -121,18 +201,65 @@
"@types/node": "10.5.8"
}
},
"@types/feathersjs__socket-commons": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@types/feathersjs__socket-commons/-/feathersjs__socket-commons-3.1.2.tgz",
"integrity": "sha512-APz1/42/pXyW4Zh15WdSc3BxBkTtlF5IdEyyNDypFYZ3HMg40A4k0bQ2wx4eqIiOw8HtFF49sGEdi40pbKCTLQ==",
"dev": true
},
"@types/feathersjs__socketio": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/feathersjs__socketio/-/feathersjs__socketio-3.0.3.tgz",
"integrity": "sha512-g+DkEkI54KJ87v6e7VsWOvK+3IViUp3DAzqQZ8Yj8hPvi2etkxgTf0TUEBwwfwG4ALeKDnfkllmAzGlx4Jmfxw==",
"dev": true,
"requires": {
"@types/feathersjs__socket-commons": "3.1.2",
"@types/socket.io": "1.4.36"
}
},
"@types/jest": {
"version": "23.3.1",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.1.tgz",
"integrity": "sha512-/UMY+2GkOZ27Vrc51pqC5J8SPd39FKt7kkoGAtWJ8s4msj0b15KehDWIiJpWY3/7tLxBQLLzJhIBhnEsXdzpgw==",
"dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
"integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
"dev": true
},
"@types/node": {
"version": "10.5.8",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.8.tgz",
"integrity": "sha512-sWSjw+bYW/2W+1V3m8tVsm9PKJcxk3NHN7oRqNUfEdofKg0Imbdu1dQbFvLKjZQXEDXRN6IfSMACjJ7Wv4NGCQ==",
"dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
"integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
"dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
"dev": true,
"requires": {
"@types/express-serve-static-core": "4.16.0",
"@types/mime": "2.0.0"
}
},
"@types/socket.io": {
"version": "1.4.36",
"resolved": "https://registry.npmjs.org/@types/socket.io/-/socket.io-1.4.36.tgz",
"integrity": "sha512-nwu9Fbz8VesmXhMzbN2r2095uvXQZy9QxyKHmHnU5/71f2/13kH7gdD9hRqTNDhNZvw/PIlhGyYgQg1t5rT1Ig==",
"dev": true,
"requires": {
"@types/node": "10.5.8"
}
},
"abab": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
@ -877,6 +1004,11 @@
"dev": true,
"optional": true
},
"camelize": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",
"integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="
},
"capture-exit": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz",
@ -1076,11 +1208,39 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"config": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/config/-/config-2.0.1.tgz",
"integrity": "sha512-aTaviJnC8ZjQYx8kQf4u6tWqIxWolyQQ3LqXgnCLAsIb78JrUshHG0YuzIarzTaVVe1Pazms3TXImfYra8UsyQ==",
"requires": {
"json5": "1.0.1"
},
"dependencies": {
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"requires": {
"minimist": "1.2.0"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
},
"content-disposition": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
},
"content-security-policy-builder": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.0.0.tgz",
"integrity": "sha512-j+Nhmj1yfZAikJLImCvPJFE29x/UuBi+/MWqggGGc515JKaZrjuei2RhULJmy0MsstW3E3htl002bwmBNMKr7w=="
},
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
@ -1119,6 +1279,15 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cors": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz",
"integrity": "sha1-K9OB8usgECAQXNUOpZ2mMJBpRoY=",
"requires": {
"object-assign": "4.1.1",
"vary": "1.1.2"
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
@ -1154,6 +1323,11 @@
"assert-plus": "1.0.0"
}
},
"dasherize": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz",
"integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg="
},
"data-urls": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.0.tgz",
@ -1320,6 +1494,11 @@
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
},
"dns-prefetch-control": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/dns-prefetch-control/-/dns-prefetch-control-0.1.0.tgz",
"integrity": "sha1-YN20V3dOF48flBXwyrsOhbCzALI="
},
"domexception": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
@ -1329,6 +1508,11 @@
"webidl-conversions": "4.0.2"
}
},
"dont-sniff-mimetype": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.0.0.tgz",
"integrity": "sha1-WTKJDcn04vGeXrAqIAJuXl78j1g="
},
"double-ended-queue": {
"version": "2.1.0-0",
"resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
@ -1604,6 +1788,11 @@
"jest-regex-util": "23.3.0"
}
},
"expect-ct": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/expect-ct/-/expect-ct-0.1.1.tgz",
"integrity": "sha512-ngXzTfoRGG7fYens3/RMb6yYoVLvLMfmsSllP/mZPxNHgFq41TmPSLF/nLY7fwoclI2vElvAmILFWGUYqdjfCg=="
},
"express": {
"version": "4.16.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz",
@ -1948,6 +2137,11 @@
"map-cache": "0.2.2"
}
},
"frameguard": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/frameguard/-/frameguard-3.0.0.tgz",
"integrity": "sha1-e8rUae57lukdEs6zlZx4I1qScuk="
},
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
@ -2684,6 +2878,47 @@
}
}
},
"helmet": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-3.13.0.tgz",
"integrity": "sha512-rCYnlbOBkeP6fCo4sXZNu91vIAWlbVgolwnUANtnzPANRf2kJZ2a6yjRnCqG23Tyl2/ExvJ8bDg4xUdNCIWnrw==",
"requires": {
"dns-prefetch-control": "0.1.0",
"dont-sniff-mimetype": "1.0.0",
"expect-ct": "0.1.1",
"frameguard": "3.0.0",
"helmet-crossdomain": "0.3.0",
"helmet-csp": "2.7.1",
"hide-powered-by": "1.0.0",
"hpkp": "2.0.0",
"hsts": "2.1.0",
"ienoopen": "1.0.0",
"nocache": "2.0.0",
"referrer-policy": "1.1.0",
"x-xss-protection": "1.1.0"
}
},
"helmet-crossdomain": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/helmet-crossdomain/-/helmet-crossdomain-0.3.0.tgz",
"integrity": "sha512-YiXhj0E35nC4Na5EPE4mTfoXMf9JTGpN4OtB4aLqShKuH9d2HNaJX5MQoglO6STVka0uMsHyG5lCut5Kzsy7Lg=="
},
"helmet-csp": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.7.1.tgz",
"integrity": "sha512-sCHwywg4daQ2mY0YYwXSZRsgcCeerUwxMwNixGA7aMLkVmPTYBl7gJoZDHOZyXkqPrtuDT3s2B1A+RLI7WxSdQ==",
"requires": {
"camelize": "1.0.0",
"content-security-policy-builder": "2.0.0",
"dasherize": "2.0.0",
"platform": "1.3.5"
}
},
"hide-powered-by": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.0.0.tgz",
"integrity": "sha1-SoWtZYgfYoV/xwr3F0oRhNzM4ys="
},
"home-or-tmp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
@ -2700,6 +2935,16 @@
"integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
"dev": true
},
"hpkp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz",
"integrity": "sha1-EOFCJk52IVpdMMROxD3mTe5tFnI="
},
"hsts": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/hsts/-/hsts-2.1.0.tgz",
"integrity": "sha512-zXhh/DqgrTXJ7erTN6Fh5k/xjMhDGXCqdYN3wvxUvGUQvnxcFfUd8E+6vLg/nk3ss1TYMb+DhRl25fYABioTvA=="
},
"html-encoding-sniffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
@ -2736,6 +2981,11 @@
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
},
"ienoopen": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.0.0.tgz",
"integrity": "sha1-NGpCj0dKrI9QzzeE6i0PFvYr2ms="
},
"import-local": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",
@ -4098,6 +4348,11 @@
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
},
"nocache": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz",
"integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA="
},
"node-int64": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
@ -4167,8 +4422,7 @@
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-copy": {
"version": "0.1.0",
@ -4458,6 +4712,11 @@
"find-up": "2.1.0"
}
},
"platform": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz",
"integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q=="
},
"pn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
@ -4705,6 +4964,11 @@
"resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz",
"integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs="
},
"referrer-policy": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.1.0.tgz",
"integrity": "sha1-NXdOtzW/UPtsB46DM0tHI1AgfXk="
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
@ -5558,6 +5822,11 @@
"lodash": "4.17.10"
}
},
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@ -5977,6 +6246,11 @@
"async-limiter": "1.0.0"
}
},
"x-xss-protection": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.1.0.tgz",
"integrity": "sha512-rx3GzJlgEeZ08MIcDsU2vY2B1QEriUKJTSiNHHUIem6eg9pzVOr2TL3Y4Pd6TMAM5D5azGjcxqI62piITBDHVg=="
},
"xml-name-validator": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",

View File

@ -4,7 +4,10 @@
"description": "How You Can Help Us backend services",
"main": "src/app.js",
"scripts": {
"test": "jest"
"pretest": "tsc",
"prestart" : "tsc",
"test": "jest",
"start": "node src/"
},
"repository": {
"type": "git",
@ -17,7 +20,10 @@
},
"homepage": "https://github.com/rtyler/howyoucanhelp.us#readme",
"devDependencies": {
"@types/feathersjs__configuration": "^1.0.1",
"@types/feathersjs__express": "^1.1.4",
"@types/feathersjs__feathers": "^3.0.4",
"@types/feathersjs__socketio": "^3.0.3",
"@types/jest": "^23.3.1",
"jest": "^23.5.0",
"ts-jest": "^23.1.3",
@ -39,9 +45,13 @@
]
},
"dependencies": {
"@feathersjs/configuration": "^2.0.0",
"@feathersjs/express": "^1.2.3",
"@feathersjs/feathers": "^3.1.7",
"cors": "^2.8.4",
"feathers-sequelize": "^3.1.2",
"feathers-sync": "^1.0.3"
"feathers-sync": "^1.0.3",
"helmet": "^3.13.0",
"tslib": "^1.9.3"
}
}

15
backend/public/index.html Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>How You Can Help Us</title>
</head>
<body>
<main class="container">
<h2 class="center-text">A backend to support howyoucanhelp.us</h2>
<footer>
<p class="center-text">From the civic hackers who also built <a href="https://sonomafireinfo.org/">Sonoma Fire Info.org</a>.</p>
</footer>
</main>
</body>
</html>

View File

@ -1,5 +1,24 @@
import 'winston';
import feathers from '@feathersjs/feathers';
const feathers = require('@feathersjs/feathers');
// import express from '@feathersjs/express';
// import from '@featherjs/configuration'
const express = require( '@feathersjs/express');
const configuration = require('@feathersjs/configuration');
const cors = require('cors');
const helmet = require('helmet');
const logger = require('winston');
const settings : any = configuration();
const app : any = express(feathers());
app.configure(settings);
app.use(cors());
app.use(helmet());
app.use('/', express.static(app.get('public')));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.configure(express.rest());
const app : any = feathers();
export default app;

16
backend/src/index.ts Normal file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env node
const winston = require('winston');
import app from './app';
const logger : any = winston.createLogger();
const port = app.get('port');
const server = app.listen(port);
process.on('unhandledRejection', (reason, p) =>
logger.error('Unhandled Rejection at: Promise ', p, reason)
);
server.on('listening', () =>
logger.info('Feathers application started on %s:%d', app.get('host'), port)
);

View File

@ -1,12 +1,13 @@
{
"compilerOptions": {
"module" : "none",
"outDir": "./dist/",
"alwaysStrict" : true,
"module" : "commonjs",
"skipLibCheck": true,
"noImplicitAny": true,
"module": "es6",
"target": "es2018",
"allowJs": true,
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"importHelpers" : true,
"target": "es5",
"sourceMap": true
},
"include": [