Skip to content

Commit

Permalink
feat: add prod and dev uri/url, minor updates to README
Browse files Browse the repository at this point in the history
  • Loading branch information
abelr20 committed Aug 22, 2024
1 parent 1bee0ed commit 7d1053d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:
# Use Docker Buildx to build the image for x86_64
docker buildx build --platform linux/amd64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
echo "Docker image $ECR_REPOSITORY:$IMAGE_TAG has been built and pushed to $ECR_REGISTRY."
- name: Deploy to Amazon ECS
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Visualizer Dashboard for AWS EC2 Instances
<br />
<a href="https://github.com/oslabs-beta/SkyScraper/issues">Report Bug</a>
·
|
<a href="https://github.com/oslabs-beta/SkyScraper/issues">Request Feature</a>

</p>
Expand Down
7 changes: 6 additions & 1 deletion client/src/features/auth/authAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import { EC2Instance, EC2Stats } from '../../app/types';
export const authApi = createApi({
reducerPath: 'authApi',
baseQuery: fetchBaseQuery({
baseUrl: 'https://skyscraper-api.com/api/',
// Production baseURL
// baseUrl: 'https://skyscraper-api.com/api/',

// Development baseURL
baseUrl: 'http://localhost:8080/api/',

prepareHeaders: (headers, { getState }) => {
const state = getState() as RootState;
const { access_token, id_token } = state.rootReducer.auth.tokens;
Expand Down
6 changes: 5 additions & 1 deletion client/src/features/auth/components/LoginButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import React from 'react';
const LoginButton: React.FC = () => {
const navigate = () => {
window.location.href =
'https://skyscraperwerock.auth.us-east-2.amazoncognito.com/oauth2/authorize?client_id=6hjtfh1ddmn4afj4c29ddijj32&response_type=token&scope=email+openid+phone+profile&redirect_uri=https%3A%2F%2Fskyscraper-api.com%2Fdashboard';
// Production URI
// 'https://skyscraperwerock.auth.us-east-2.amazoncognito.com/oauth2/authorize?client_id=6hjtfh1ddmn4afj4c29ddijj32&response_type=token&scope=email+openid+phone+profile&redirect_uri=https%3A%2F%2Fskyscraper-api.com%2Fdashboard';

// Development URI
'https://skyscraperwerock.auth.us-east-2.amazoncognito.com/oauth2/authorize?client_id=6hjtfh1ddmn4afj4c29ddijj32&response_type=token&scope=email+openid+phone+profile&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fdashboard';
};

return (
Expand Down
2 changes: 1 addition & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.use('*', (req, res) => {
app.use(ErrorHandler);

app.listen(PORT, () => {
console.log(`Server Online and listening on PORT ${PORT}`);
console.log(`Server: Listening on PORT ${PORT}`);
});

export default app;

0 comments on commit 7d1053d

Please sign in to comment.