Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
.env
process.env
dist
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We use github to host code, to track issues and feature requests, as well as acc

Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
1. Fork the repo and create your branch from `dev`.
2. If you've added code that should be tested, add tests.
3. Ensure the test suite passes.
4. Make sure your code lints.
Expand Down
78 changes: 61 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,12 @@
</br>
</br>
<br/>
<br/>
<br/>

# Accessing Grafana

1. You will need to obtain the stateful set of your clusters. <br />

```
```
kubectl get statefulset
```

Expand Down Expand Up @@ -156,8 +154,6 @@

</br>
<br/>
<br/>
<br/>

# Accessing Prometheus <br/></br>

Expand Down Expand Up @@ -193,7 +189,37 @@

</br>
<br/>
<br/>


# Running Zeus

1. Fork and clone the `dev` branch onto your local branch.
``` bash
https://github.com/oslabs-beta/Zeus.git
```

2. Install all the dependencies
``` bash
npm install
```
3. Create ```process.env``` file at the root directory
``` bash
root
├─ process.env
├─ electron
└─ src
```
4. Connect to NoSQL database in .env

``` js
mongoURI = "Your NoSQL URI string"
```
5. Ensure your cluster is running and then you can start the application with:
``` bash
npm run electron
```

</br>
<br/>

# Made with
Expand Down Expand Up @@ -226,9 +252,9 @@
![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?style=for-the-badge&logo=Prometheus&logoColor=white)

</br>

<br/>
<br/>
<br/>


# Contributions

Expand All @@ -237,24 +263,42 @@ For more information regarding how to contribute, please refer to the
guidelines from this repo.

1. Fork and clone the `dev` branch onto your local branch.
2. Create a new a feature branch
``` bash
https://github.com/oslabs-beta/Zeus.git
```
2. Create a new a feature branch
``` bash
[your-name]/AWESOME-FEATURES
```
3. Please ensure you are following eslint conventions.
4. Please ensure to create tests for your feature and that it passes your test suite.
5. Please be detailed in your pull request.

3. Install all the dependencies
``` bash
npm install
```
4. Create ```process.env``` file at the root directory
``` bash
root
├─ process.env
├─ electron
└─ src
```
5. Connect to NoSQL database in .env

``` js
mongoURI = "Your NoSQL URI string"
```
6. ***Please ensure you are following eslint conventions***.
7. ***Please ensure to create tests for your feature and that it passes your test suite***.
8. **Please be detailed in your pull request**.

![img](./Demo%20Shots/PR-guide.png)

</br>
<br/>
<br/>
<br/>

# Founders

- Ed Cho [LinkedIn](https://www.linkedin.com/in/edcho720/)| [GitHub](https://github.com/edcho720)
- Ed Cho [LinkedIn](https://www.linkedin.com/in/edcho720/) | [GitHub](https://github.com/edcho720)
- John Wroge [LinkedIn](https://www.linkedin.com/in/john-wroge/) | [GitHub](https://github.com/johnwroge)
- Harvey Li [LinkedIn](https://www.linkedin.com/in/harvey-li/) | [GitHub](https://github.com/harvli)
- Amy (Aimée) Nguyen [LinkedIn](https://www.linkedin.com/in/aqn/) |
[GitHub](https://github.com/DoctorCodeine)
- Amy (Aimée) Nguyen [LinkedIn](https://www.linkedin.com/in/aqn/) | [GitHub](https://github.com/DoctorCodeine)
15 changes: 2 additions & 13 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */

module.exports = {
preset: 'ts-jest',
testEnvironment: ['node', 'jsdom']
// moduleFileExtensions: [
// 'js',
// 'jsx',
// 'json',
// 'node',
// 'ts'
// ],
// transform: {
// '^.+\\.js$': 'babel-jest',
// '^.+\\.(ts|tsx)$': 'ts-jest'
// }
preset: 'ts-jest',
testEnvironment: ['node', 'jsdom']
};
79 changes: 70 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"css-loader": "^6.7.2",
"dotenv": "^16.0.3",
"eslint-config-airbnb": "^19.0.4",
"express": "^4.18.2",
"formik": "^2.2.9",
Expand All @@ -114,6 +115,7 @@
"mongosh": "^1.6.1",
"node-fetch": "^3.3.0",
"nodemon": "^2.0.20",
"path": "^0.12.7",
"prom-client": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
12 changes: 7 additions & 5 deletions src/server/database/db.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
import { ErrorRequestHandler } from 'express';
import path from 'path';

//acquiring mongoose framework
const mongoose = require('mongoose');

require("dotenv").config({
path: path.resolve(__dirname, "../../../process.env"),
});

//this line below is used to suppress deprecation warnings
mongoose.set('strictQuery', true);

//Data can be accessed anywhere -Look at env file to find username and password
const mongoURI = 'mongodb+srv://zeus:123@cluster0.ntr77xf.mongodb.net/?retryWrites=true&w=majority';

//to hid server from public
const URI = process.env.MONGO_URI || mongoURI;
const URI = process.env.MONGO_URI;

//establishing connection to mongo
mongoose
.connect(URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
dbName: 'zeus',
// dbName: 'zeus',
})
.then(() => console.log('🦆🦆🦆🦆🦆🦆🦆🦆 Mongoose is connected'))
.catch((err: ErrorRequestHandler) => {
Expand All @@ -34,5 +38,3 @@ const userSchema = new mongoose.Schema({
const Users = mongoose.model('Users', userSchema);
// Export db
module.exports = Users;

export {};
27 changes: 0 additions & 27 deletions test.html

This file was deleted.

Loading