Skip to content

Commit

Permalink
Merge pull request #44 from fastsurvey/fuse-with-backend
Browse files Browse the repository at this point in the history
Fuse with backend
  • Loading branch information
dostuffthatmatters authored May 7, 2021
2 parents 7ec0fb4 + c927095 commit 588b4ab
Show file tree
Hide file tree
Showing 98 changed files with 2,356 additions and 2,151 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
scripts/
node_modules/
.env
22 changes: 0 additions & 22 deletions .gcloudignore

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

.idea
tailwind.out.css

*.out.css
scripts

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.vscode
*.out.css
*.config.js
*.yml
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:12

COPY package.json package.json
COPY yarn.lock yarn.lock

RUN yarn install --production=true

COPY server.js server.js
COPY build build

EXPOSE 8080
CMD [ "node", "server.js" ]
1 change: 1 addition & 0 deletions icon-information.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"dependencies": {
"axios": "^0.19.2",
"express": "^4.17.1",
"lodash": "^4.17.21",
"node-sass": "^4.14.1",
"react": "^16.13.1",
Expand All @@ -23,7 +24,8 @@
"build": "react-scripts build",
"build:tailwind": "NODE_ENV=production postcss src/styles/tailwind.css -o src/styles/tailwind.out.css",
"serve": "node app.js",
"lint": "tslint 'src/**/*.{ts,tsx,js}'"
"lint": "tslint 'src/**/*.{ts,tsx,js}'",
"test": "react-scripts test"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
3 changes: 3 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require('autoprefixer'), require('@tailwindcss/jit')],
};
9 changes: 9 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
trailingComma: 'all',
tabWidth: 4,
semi: true,
singleQuote: true,
jsxSingleQuote: true,
bracketSpacing: false,
jsxBracketSameLine: false,
};
22 changes: 22 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const express = require('express');
const path = require('path');

const app = express();
app.disable('x-powered-by');

// Serve the static files from the React app
app.use(express.static(path.join(__dirname + '/build')));

// Handles any requests that don't match the ones above
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname + '/build/index.html'));
});

// Start the server
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
console.log(`App listening on port ${PORT}`);
console.log('Press Ctrl+C to quit.');
});

module.exports = app;
118 changes: 0 additions & 118 deletions src/App/SurveyPages/FormFieldWrapper.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions src/App/SurveyPages/FormFields/EmailField.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions src/App/SurveyPages/FormFields/FieldParts/HintBox.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/App/SurveyPages/FormFields/FieldParts/QuestionTitleBox.tsx

This file was deleted.

Loading

0 comments on commit 588b4ab

Please sign in to comment.