Skip to content

Commit fca402b

Browse files
authored
Merge pull request #24 from oslabs-beta/CHRONOS-99-update-chronosWebsite-README
CHRONOS-99 Update README
2 parents 6fd1360 + 21346a0 commit fca402b

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
npm# Instructions
1+
# npm Instructions
22

33
**To update the file, follow the below steps:**
44

@@ -34,7 +34,7 @@ npm# Instructions
3434
5. Select all, click on the actions dropdown and click copy. Save a copy of the existing `bundle.js` and `index.html` just in case. Follow the naming rules directed by amazon, but don't change any of the settings. Save the copy.
3535
4. After saving the copy, go back to the S3 home, select **chronoslany.com** again.
3636
5. select all objects and delete from the bucket.
37-
5. Upload the new bundled `bundle.js` and `index.html` (located in `./dist`), as well as your photos with the uglified names. Basically open the folders in a GUI and copy paste all the files in './dist' into the aws upload module.
38-
6. You should be good to go!!!! However, because the website caches, you may need to visit from another browser or incognito mode to see changes. It might not take 24 hours, but give it a few minutes before checking. Make sure to use a different browser as previously stated.
37+
5. Upload the new bundled `bundle.js` and `index.html` (located in `./dist`), as well as your photos with the uglified names. Basically open the folders in a GUI and copy paste all the files in './dist' into the AWS upload module.
38+
6. You should be good to go!! However, because the website caches, you may need to visit from another browser or incognito mode to see changes. It can update in 1 minute, but give it up to 5 minutes before checking. Make sure to use a different browser as previously stated.
3939

40-
_Note: The website will take around 24 hours to update with your changes._
40+
_Note: The website should take up to 5 minutes to update with your changes based on the current Cloudflare TTL update of January 2025._

dist/react-devtools/preload.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const {clipboard, shell, contextBridge} = require('electron');
2+
const fs = require('fs');
3+
const internalIP = require('internal-ip');
4+
5+
// Expose protected methods so that render process does not need unsafe node integration
6+
contextBridge.exposeInMainWorld('api', {
7+
electron: {clipboard, shell},
8+
ip: {address: internalIP.v4.sync},
9+
getDevTools() {
10+
let devtools;
11+
try {
12+
devtools = require('react-devtools-core/standalone').default;
13+
} catch (err) {
14+
alert(
15+
err.toString() +
16+
'\n\nDid you run `yarn` and `yarn run build` in packages/react-devtools-core?',
17+
);
18+
}
19+
return devtools;
20+
},
21+
readEnv() {
22+
let options;
23+
let useHttps = false;
24+
try {
25+
if (process.env.KEY && process.env.CERT) {
26+
options = {
27+
key: fs.readFileSync(process.env.KEY),
28+
cert: fs.readFileSync(process.env.CERT),
29+
};
30+
useHttps = true;
31+
}
32+
} catch (err) {
33+
console.error('Failed to process SSL options - ', err);
34+
options = undefined;
35+
}
36+
const host = process.env.HOST || 'localhost';
37+
const protocol = useHttps ? 'https' : 'http';
38+
const port = +process.env.PORT || 8097;
39+
return {options, useHttps, host, protocol, port};
40+
},
41+
});

0 commit comments

Comments
 (0)