Skip to content

Commit 99d7397

Browse files
committed
changes for deployment
1 parent aa10ff7 commit 99d7397

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ COPY --from=build /app/package*.json ./
2424

2525
RUN npm install --no-install-recommends --only=production --fetch-retry-maxtimeout 500000
2626

27-
COPY --from=build /app/.env .env
27+
# COPY --from=build /app/.env .env
2828
COPY --from=build /app/config.js ./config.js
2929
COPY --from=build /app/server ./server
3030
COPY --from=build /app/app/dist /app

Dockerrun.aws.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
"Value": "Reactypev15-env.eba-mbvivk7k.us-east-1.elasticbeanstalk.com"
1616
}
1717
]
18-
}
18+
}

app/src/components/login/SignIn.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = (props) => {
215215
<Container component="main" maxWidth="xs">
216216
<CssBaseline />
217217
<div className={classes.paper}>
218-
<Button
218+
{/* <Button
219219
color="primary"
220220
style={{
221221
minWidth: '113.97px',
@@ -227,7 +227,7 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = (props) => {
227227
onClick={handleDarkModeToggle}
228228
>
229229
{isDarkMode ? `Light Mode` : `Dark Mode`}
230-
</Button>
230+
</Button> */}
231231
<Avatar className={classes.avatar} sx={{ marginTop: '10vh' }}>
232232
<LockOutlinedIcon />
233233
</Avatar>
@@ -295,7 +295,7 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = (props) => {
295295
<path d="M8.256 14a4.474 4.474 0 0 1-.229-1.004H3c.001-.246.154-.986.832-1.664C4.484 10.68 5.711 10 8 10c.26 0 .507.009.74.025.226-.341.496-.65.804-.918C9.077 9.038 8.564 9 8 9c-5 0-6 3-6 4s1 1 1 1h5.256Z" />
296296
</svg>
297297
</Button>
298-
<Button
298+
{/* <Button
299299
fullWidth
300300
id="SignInWithGithub"
301301
variant="contained"
@@ -344,7 +344,7 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = (props) => {
344344
>
345345
<path d="M15.545 6.558a9.42 9.42 0 0 1 .139 1.626c0 2.434-.87 4.492-2.384 5.885h.002C11.978 15.292 10.158 16 8 16A8 8 0 1 1 8 0a7.689 7.689 0 0 1 5.352 2.082l-2.284 2.284A4.347 4.347 0 0 0 8 3.166c-2.087 0-3.86 1.408-4.492 3.304a4.792 4.792 0 0 0 0 3.063h.003c.635 1.893 2.405 3.301 4.492 3.301 1.078 0 2.004-.276 2.722-.764h-.003a3.702 3.702 0 0 0 1.599-2.431H8v-3.08h7.545z" />
346346
</svg>
347-
</Button>
347+
</Button> */}
348348
<Button
349349
fullWidth
350350
variant="contained"

app/src/components/right/LoginButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const { API_BASE_URL, API_BASE_URL2 } = config;
1010
export default function LoginButton() {
1111
const state = useSelector((store:RootState) => store.appState);
1212
const dispatch = useDispatch();
13+
1314
const handleLogout = () => {
1415

1516
window.localStorage.clear();

app/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const PrivateRoute = ({ component: Component, ...rest }) => (
4141
/>
4242
);
4343

44+
4445
ReactDOM.render(
4546
<ApolloProvider client={client}>
4647
<Provider store={store}>

server/server.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,18 @@ const passportSetup = require('./routers/passport-setup');
6767
const session = require('express-session');
6868
import authRoutes from './routers/auth';
6969

70-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
71-
//I don't believe this portion of the code is being used. It just creates a session cookie, but majority of the controllers right now use mongodb as a sessionController, not passport.
72-
// app.use(
73-
// session({
74-
// secret: process.env.SESSION_SECRET,
75-
// resave: false,
76-
// saveUninitialized: true,
77-
// cookie: { maxAge: 24 * 60 * 60 * 1000 }
78-
// })
79-
// );
80-
// app.use(passport.initialize());
81-
// app.use(passport.session());
82-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
70+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
71+
app.use(
72+
session({
73+
secret: process.env.SESSION_SECRET,
74+
resave: false,
75+
saveUninitialized: true,
76+
cookie: { maxAge: 24 * 60 * 60 * 1000 }
77+
})
78+
);
79+
app.use(passport.initialize());
80+
app.use(passport.session());
81+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8382

8483
// go to other files
8584
// 8080 only for the container

0 commit comments

Comments
 (0)