Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Convert frontend to Typescript #5

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<<<<<<< HEAD
.DS_Store

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

# dependencies
Expand All @@ -21,3 +27,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
>>>>>>> de123a4fe033ab9e4608bbf4ce000a83f210f05b
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 CAPTxTreeckle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<<<<<<< HEAD
# Treeckle-2.0
=======
<img src="./Treeckle_poster.png" />

<img src="./Treeckle.png" width="300" />
Expand All @@ -19,3 +22,4 @@ Project video: [Video link](https://www.youtube.com/watch?v=TeCNkYFiCh4&t=1s)
| Sree Subbash | [@sreesubbash](https://github.com/sreesubbash)|Full Stack |
| Jeremy Tan | [@JermyTan](https://github.com/JermyTan) |Frontend |
| Rohan Arya Varma | [@rohan-av](https://github.com/rohan-av) |Frontend & UI/UX Design |
>>>>>>> de123a4fe033ab9e4608bbf4ce000a83f210f05b
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ typings/
/config/keys.js
/uploads
/public/*
!public/EventPoster.png
!public/EventPoster.png
2 changes: 2 additions & 0 deletions backend/Recommendation/in.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ id,title,des

5e26144fb2f5c4401e35b837,Welcome Back Dinner CAPT Dining Hall


5ef392667818ee697861aad3,Testing,Testing Cynthia SR1
3 changes: 3 additions & 0 deletions backend/graphql/schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type Query {
info: String!
}
16 changes: 10 additions & 6 deletions backend/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const express = require("express");
const mongoose = require("mongoose");
const {
configurePermissions
configurePermissions,
} = require("./models/authentication/permissions-model");
const keys = require("./config/keys");

Expand All @@ -15,7 +15,7 @@ const app = express();
const path = require("path");
const port = 3000;

const serveIndex = require('serve-index');
const serveIndex = require("serve-index");

//Initialize
app.use(passport.initialize());
Expand All @@ -28,7 +28,7 @@ mongoose.connect(
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: false
useFindAndModify: false,
},
() => {
console.log("Connected to mongoDB");
Expand All @@ -45,13 +45,17 @@ app.get("/", (req, res) =>

app.use(express.static(path.join(__dirname, "../frontend/build")));

app.use('/ftp', express.static('public'), serveIndex('public', {'icons': true}));
app.use(
"/ftp",
express.static("public"),
serveIndex("public", { icons: true })
);

app.use('/about', express.static("../frontend/landing"));
app.use("/about", express.static("../frontend/landing"));

//Catch GET requests to invalid URIs and redirect to home page
app.get("/*", (req, res) => {
res.sendFile(path.join(__dirname, "../frontend/build/index.html"));
res.sendFile(path.join(__dirname, "../frontend/build/index.html"));
});

app.listen(port, () => console.log(`Application running on port ${port}!`));
Loading