Bring back some frontend webapp stuff into the backend directory for serving

It doesn't make sense right now to split the basic frontend application (simple
introductory site) from the backend APIs at the moment.

Since we're splitting on Mobile App / REST API, this application can hold onto
everything for now.

If we decide to build a full-featured mobile web app in the future, that should
go back into frontend/
This commit is contained in:
R. Tyler Croy 2018-08-12 08:52:03 -07:00
parent 0d5795de41
commit 54c0ff733e
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
7 changed files with 3448 additions and 1 deletions

10
backend/index.html Normal file
View File

@ -0,0 +1,10 @@
<html>
<head>
<title>How You Can Help Us</title>
</head>
<body>
<center>
Hello World
</center>
</body>
</html>

3380
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
"main": "src/app.js",
"scripts": {
"pretest": "tsc",
"prestart" : "tsc",
"prestart": "tsc",
"test": "jest",
"start": "node src/"
},
@ -25,9 +25,15 @@
"@types/feathersjs__feathers": "^3.0.4",
"@types/feathersjs__socketio": "^3.0.3",
"@types/jest": "^23.3.1",
"awesome-typescript-loader": "^5.2.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^23.5.0",
"source-map-loader": "^0.2.3",
"ts-jest": "^23.1.3",
"typescript": "^3.0.1",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5",
"winston": "^3.0.0"
},
"jest": {
@ -48,6 +54,7 @@
"@feathersjs/configuration": "^2.0.0",
"@feathersjs/express": "^1.2.3",
"@feathersjs/feathers": "^3.1.7",
"bootstrap": "^4.1.3",
"cors": "^2.8.4",
"feathers-sequelize": "^3.1.2",
"feathers-sync": "^1.0.3",

7
backend/src/pwa/index.js Normal file
View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var feathers_1 = tslib_1.__importDefault(require("@feathersjs/feathers"));
var app = feathers_1.default();
console.log("Loaded feathers and ready to roll");
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,0EAA2C;AAE3C,IAAM,GAAG,GAAS,kBAAQ,EAAE,CAAC;AAE7B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC"}

5
backend/src/pwa/index.ts Normal file
View File

@ -0,0 +1,5 @@
import feathers from '@feathersjs/feathers'
const app : any = feathers();
console.log(`Loaded feathers and ready to roll`);

37
backend/webpack.config.js Normal file
View File

@ -0,0 +1,37 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
main: './src/pwa/index.ts',
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader',
exclude: /node_modules/,
options: {
useCache: true,
}
},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./index.html",
excludeChunks: [
],
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.js', '.jsx', '.json']
},
output: {
path: path.resolve(__dirname, 'dist'),
}
};