This commit is contained in:
PenguinRobert1
2024-01-05 17:48:33 +00:00
parent d5652ddbb1
commit 887257db16
13 changed files with 0 additions and 7139 deletions
@@ -1,10 +0,0 @@
/**
* These rules enforce the Hack Reactor Style Guide
*
* Visit this repo for more information:
* https://github.com/reactorcore/eslint-config-hackreactor
*/
module.exports = {
extends: './node_modules/eslint-config-hackreactor/index.js'
};
@@ -1,27 +0,0 @@
## MAC files ##
.DS_Store
## NPM ##
npm
npm-debug.log
node_modules/
pids
*.pid
logs
*.log
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Compiled Dirs (http://nodejs.org/api/addons.html)
build/
dist/
publid/bundle.js
@@ -1 +0,0 @@
v6.13.0
@@ -1,13 +0,0 @@
{
"editor.lightbulb.enabled": false,
"editor.parameterHints.enabled": false,
"editor.renderWhitespace": "all",
"editor.snippetSuggestions": "none",
"editor.tabSize": 2,
"editor.wordWrap": "on",
"emmet.showExpandedAbbreviation": "never",
"files.trimTrailingWhitespace": true,
"javascript.suggest.enabled": false,
"javascript.updateImportsOnFileMove.enabled": "never",
"javascript.validate.enable": false
}
@@ -1,38 +0,0 @@
# Project Name
> Hostile World
## Related Projects
- https://github.com/hrr47-karev/Reviews-Service
- https://github.com/hrr47-karev/description-map-rules-service
- https://github.com/hrr47-karev/AvailabilityComponent
- https://github.com/hrr47-karev/imageCarousel
## Table of Contents
1. [Usage](#Usage)
1. [Requirements](#requirements)
1. [Development](#development)
## Usage
> PLEASE NOTE: this proxy server is set up so that it should be able to run locally and in production. One thing to note is that when it was used in production, I made manual routing of all API calls in my Nginx sites-available file to all the separate services. If you encounter any issues connecting the services when live on ec2, you may need to do the same using Nginx.
## Requirements
An `nvmrc` file is included if using [nvm](https://github.com/creationix/nvm).
- Node 6.13.0
- etc
## Development
### Installing Dependencies
From within the root directory:
```sh
npm install -g webpack
npm install
```
@@ -1,4 +0,0 @@
## Style Guide
Refer to the [AirBnb Style Guide](https://github.com/airbnb/javascript).
File diff suppressed because it is too large Load Diff
@@ -1,38 +0,0 @@
{
"name": "",
"version": "",
"description": "",
"author": "",
"license": "",
"engines": {
"node": ">=6.13.0"
},
"scripts": {
"build": "webpack",
"start": "node server/index.js",
"react-dev": "webpack -d --watch",
"server-dev": "nodemon server/index.js"
},
"dependencies": {
"cors": "^2.8.5",
"css-loader": "^4.2.1",
"dotenv-webpack": "^2.0.0",
"express": "^4.17.1",
"http-proxy-middleware": "^1.0.5",
"nodemon": "^2.0.4",
"path": "^0.12.7",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-svg-loader": "^3.0.3",
"style-loader": "^1.2.1"
},
"devDependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"babel-loader": "^8.1.0",
"eslint-config-hackreactor": "git://github.com/reactorcore/eslint-config-hackreactor",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
}
}
@@ -1,80 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
html {
width: 100vw;
height: 100vw;
margin: 0;
padding: 0;
}
body {
width: 100vw;
height: 100vw;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: 100vw;
grid-template-rows: auto auto auto auto auto;
}
section #images_header {
grid-column: 1 / 2;
grid-row: 1 / 2;
display: flex;
width: 100vw;
justify-content: center;
}
section #desc_map_rules {
grid-column: 1 / 2;
grid-row: 2 / 3;
overflow: hidden;
display: flex;
width: 100vw;
justify-content: center;
}
section #image_grid {
grid-column: 1 / 2;
grid-row: 3 / 4;
display: flex;
width: 100vw;
justify-content: center;
}
section #availability {
grid-column: 1 / 2;
grid-row: 4 / 5;
display: flex;
width: 100vw;
justify-content: center;
}
section #reviews {
grid-column: 1 / 2;
grid-row: 5 / 6;
display: flex;
height: max-content;
width: 100vw;
justify-content: center;
}
</style>
</head>
<body>
<section id="images_header"></section>
<section id="desc_map_rules"></section>
<section id="image_grid"></section>
<section id="Availability"></section>
<section id="reviews"></section>
<!-- <script src="../node_modules/react/umd/react.development.js"></script>
<script src="../node_modules/react-dom/umd/react-dom.development.js"></script> -->
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
<script src="http://localhost:3009/bundle.js"></script>
<script src="http://localhost:3007/bundle.js"></script>
<script src="http://localhost:3000/public/bundle.js"></script>
<script src="http://localhost:3001/dist/bundle.js"></script>
</body>
</html>
@@ -1,63 +0,0 @@
html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto auto auto 500px auto;
background-color: blue;
}
section #images_header {
grid-column: 1 / 2;
grid-row: 1 / 2;
display: flex;
height: max-content;
width: 100%;
justify-content: center;
}
section #desc_map_rules {
grid-column: 1 / 2;
grid-row: 2 / 3;
overflow: hidden;
display: flex;
height: max-content;
width: 100%;
justify-content: center;
}
section #image_grid {
grid-column: 1 / 2;
grid-row: 3 / 4;
display: flex;
height: max-content;
width: 100%;
justify-content: center;
}
section #availability {
grid-column: 1 / 2;
grid-row: 4 / 5;
display: flex;
height: max-content;
width: 100%;
justify-content: center;
}
section #reviews {
grid-column: 1 / 2;
grid-row: 5 / 6;
display: flex;
height: max-content;
width: 100%;
justify-content: center;
}
@@ -1,28 +0,0 @@
const express = require('express');
const path = require('path');
const { createProxyMiddleware }= require('http-proxy-middleware');
const app = express();
const PORT = 3030;
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
next();
});
app.use('/hostels/:hostel_id', express.static(path.join(__dirname, '../public')));
// API reroutes
// Image carousel service
app.use('/api/hostels/:hostel_id/images', createProxyMiddleware({ target: 'http://localhost:3007', changeOrigin: true }));
// availability service
app.use('/api/hostel/:hostelId/rooms', createProxyMiddleware({ target: 'http://localhost:3009', changeOrigin: true }));
// description map rules service
app.use('/house/:id/hostel', createProxyMiddleware({ target: 'http://localhost:3000', changeOrigin: true }));
app.use('/house/:id/description', createProxyMiddleware({ target: 'http://localhost:3000', changeOrigin: true }));
app.use('/house/:id/rules', createProxyMiddleware({ target: 'http://localhost:3000', changeOrigin: true }));
app.use('/house/:id/address', createProxyMiddleware({ target: 'http://localhost:3000', changeOrigin: true }));
// reviews service
app.use('/api/reviews', createProxyMiddleware({ target: 'http://localhost:3001', changeOrigin: true }));
app.listen(PORT, () => console.log('Proxy Server listening on port ', PORT));