Skip to content

Commit 13c82d9

Browse files
authored
Merge pull request #134 from oslabs-beta/AH/container
House keeping
2 parents 006dffe + 35649c3 commit 13c82d9

File tree

9 files changed

+144
-80
lines changed

9 files changed

+144
-80
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
.env
2+
process.env
33
dist

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ We use github to host code, to track issues and feature requests, as well as acc
1616

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

19-
1. Fork the repo and create your branch from `main`.
19+
1. Fork the repo and create your branch from `dev`.
2020
2. If you've added code that should be tested, add tests.
2121
3. Ensure the test suite passes.
2222
4. Make sure your code lints.

README.md

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,12 @@
8686
</br>
8787
</br>
8888
<br/>
89-
<br/>
90-
<br/>
9189
9290
# Accessing Grafana
9391
9492
1. You will need to obtain the stateful set of your clusters. <br />
9593
96-
```
94+
```
9795
kubectl get statefulset
9896
```
9997
@@ -156,8 +154,6 @@
156154
157155
</br>
158156
<br/>
159-
<br/>
160-
<br/>
161157
162158
# Accessing Prometheus <br/></br>
163159
@@ -193,7 +189,37 @@
193189
194190
</br>
195191
<br/>
196-
<br/>
192+
193+
194+
# Running Zeus
195+
196+
1. Fork and clone the `dev` branch onto your local branch.
197+
``` bash
198+
https://github.com/oslabs-beta/Zeus.git
199+
```
200+
201+
2. Install all the dependencies
202+
``` bash
203+
npm install
204+
```
205+
3. Create ```process.env``` file at the root directory
206+
``` bash
207+
root
208+
├─ process.env
209+
├─ electron
210+
└─ src
211+
```
212+
4. Connect to NoSQL database in .env
213+
214+
``` js
215+
mongoURI = "Your NoSQL URI string"
216+
```
217+
5. Ensure your cluster is running and then you can start the application with:
218+
``` bash
219+
npm run electron
220+
```
221+
222+
</br>
197223
<br/>
198224

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

228254
</br>
255+
229256
<br/>
230-
<br/>
231-
<br/>
257+
232258

233259
# Contributions
234260

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

239265
1. Fork and clone the `dev` branch onto your local branch.
240-
2. Create a new a feature branch
266+
``` bash
267+
https://github.com/oslabs-beta/Zeus.git
241268
```
269+
2. Create a new a feature branch
270+
``` bash
242271
[your-name]/AWESOME-FEATURES
243272
```
244-
3. Please ensure you are following eslint conventions.
245-
4. Please ensure to create tests for your feature and that it passes your test suite.
246-
5. Please be detailed in your pull request.
273+
274+
3. Install all the dependencies
275+
``` bash
276+
npm install
277+
```
278+
4. Create ```process.env``` file at the root directory
279+
``` bash
280+
root
281+
├─ process.env
282+
├─ electron
283+
└─ src
284+
```
285+
5. Connect to NoSQL database in .env
286+
287+
``` js
288+
mongoURI = "Your NoSQL URI string"
289+
```
290+
6. ***Please ensure you are following eslint conventions***.
291+
7. ***Please ensure to create tests for your feature and that it passes your test suite***.
292+
8. **Please be detailed in your pull request**.
293+
247294
![img](./Demo%20Shots/PR-guide.png)
248295

249296
</br>
250297
<br/>
251-
<br/>
252-
<br/>
253298

254299
# Founders
255300

256-
- Ed Cho [LinkedIn](https://www.linkedin.com/in/edcho720/)| [GitHub](https://github.com/edcho720)
301+
- Ed Cho [LinkedIn](https://www.linkedin.com/in/edcho720/) | [GitHub](https://github.com/edcho720)
257302
- John Wroge [LinkedIn](https://www.linkedin.com/in/john-wroge/) | [GitHub](https://github.com/johnwroge)
258303
- Harvey Li [LinkedIn](https://www.linkedin.com/in/harvey-li/) | [GitHub](https://github.com/harvli)
259-
- Amy (Aimée) Nguyen [LinkedIn](https://www.linkedin.com/in/aqn/) |
260-
[GitHub](https://github.com/DoctorCodeine)
304+
- Amy (Aimée) Nguyen [LinkedIn](https://www.linkedin.com/in/aqn/) | [GitHub](https://github.com/DoctorCodeine)

jest.config.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} */
22

33
module.exports = {
4-
preset: 'ts-jest',
5-
testEnvironment: ['node', 'jsdom']
6-
// moduleFileExtensions: [
7-
// 'js',
8-
// 'jsx',
9-
// 'json',
10-
// 'node',
11-
// 'ts'
12-
// ],
13-
// transform: {
14-
// '^.+\\.js$': 'babel-jest',
15-
// '^.+\\.(ts|tsx)$': 'ts-jest'
16-
// }
4+
preset: 'ts-jest',
5+
testEnvironment: ['node', 'jsdom']
176
};

package-lock.json

Lines changed: 70 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"cookie-parser": "^1.4.6",
102102
"cors": "^2.8.5",
103103
"css-loader": "^6.7.2",
104+
"dotenv": "^16.0.3",
104105
"eslint-config-airbnb": "^19.0.4",
105106
"express": "^4.18.2",
106107
"formik": "^2.2.9",
@@ -114,6 +115,7 @@
114115
"mongosh": "^1.6.1",
115116
"node-fetch": "^3.3.0",
116117
"nodemon": "^2.0.20",
118+
"path": "^0.12.7",
117119
"prom-client": "^14.1.0",
118120
"react": "^18.2.0",
119121
"react-dom": "^18.2.0",

src/server/database/db.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
import { ErrorRequestHandler } from 'express';
2+
import path from 'path';
23

34
//acquiring mongoose framework
45
const mongoose = require('mongoose');
56

7+
require("dotenv").config({
8+
path: path.resolve(__dirname, "../../../process.env"),
9+
});
10+
611
//this line below is used to suppress deprecation warnings
712
mongoose.set('strictQuery', true);
813

914
//Data can be accessed anywhere -Look at env file to find username and password
10-
const mongoURI = 'mongodb+srv://zeus:[email protected]/?retryWrites=true&w=majority';
1115

1216
//to hid server from public
13-
const URI = process.env.MONGO_URI || mongoURI;
17+
const URI = process.env.MONGO_URI;
1418

1519
//establishing connection to mongo
1620
mongoose
1721
.connect(URI, {
1822
useNewUrlParser: true,
1923
useUnifiedTopology: true,
20-
dbName: 'zeus',
24+
// dbName: 'zeus',
2125
})
2226
.then(() => console.log('🦆🦆🦆🦆🦆🦆🦆🦆 Mongoose is connected'))
2327
.catch((err: ErrorRequestHandler) => {
@@ -34,5 +38,3 @@ const userSchema = new mongoose.Schema({
3438
const Users = mongoose.model('Users', userSchema);
3539
// Export db
3640
module.exports = Users;
37-
38-
export {};

test.html

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)