irongit

'add website'

huncholanehuncholaneauthored
parent b2dad23commit 0c64103cd629ed84c9d692e62d33824051430a49Browse files

6 files changed, +55 -4

+5-0Client/.dockerignore
@@ -0,0 +1,5 @@
1+.env
2+package-lock.json
3+node_modules
4+build
5+.vscode
+12-0Client/bucket-policy.json
@@ -0,0 +1,12 @@
1+{
2+ "Version": "2012-10-17",
3+ "Statement": [
4+ {
5+ "Sid": "PublicReadGetObject",
6+ "Effect": "Allow",
7+ "Principal": "*",
8+ "Action": "s3:GetObject",
9+ "Resource": "arn:aws:s3:::real-e-state-hygo/*"
10+ }
11+ ]
12+}
+7-0Client/dockerfile
@@ -0,0 +1,7 @@
1+FROM node:20
2+WORKDIR /code
3+COPY package.json .
4+RUN npm i
5+COPY . .
6+RUN npm run build
7+CMD [""]
+2-4Client/src/views/admin/meeting/components/Addmeeting.js
@@ -22,7 +22,6 @@ const AddMeeting = (props) => {
2222 const [leadModelOpen, setLeadModel] = useState(false);
2323 const todayTime = new Date().toISOString().split('.')[0];
2424 const leadData = useSelector((state) => state?.leadData?.data);
25- console.log(props.init);
2625
2726 const user = JSON.parse(localStorage.getItem('user'));
2827
@@ -43,7 +42,6 @@ const AddMeeting = (props) => {
4342 initialValues: initialValues,
4443 validationSchema: MeetingSchema,
4544 onSubmit: (values, { resetForm }) => {
46- console.log('saving');
4745 if (props.id) {
4846 editData();
4947 } else {
@@ -75,7 +73,7 @@ const AddMeeting = (props) => {
7573 toast.success(`Added a meeting for ${values.dateTime} ๐Ÿ˜„`);
7674 }
7775 } catch (e) {
78- console.log(e);
76+ console.error(e);
7977 toast.error('Failed to add meeting ๐Ÿ˜ž');
8078 } finally {
8179 setIsLoding(false);
@@ -94,7 +92,7 @@ const AddMeeting = (props) => {
9492 props.setData({ ...values, createByName: props.init.createByName, timestamp: new Date() });
9593 }
9694 } catch (e) {
97- console.log(e);
95+ console.error(e);
9896 toast.error('Failed to update meeting ๐Ÿ˜ž');
9997 } finally {
10098 setIsLoding(false);
+1-0README.md
@@ -20,3 +20,4 @@
2020
2121 - I set the constant baseUrl in the code for demonstration purpose. It should be set in the environment.
2222 - Unsure what to do for the attendees part, but have implemented, view, delete many, delete, view many, and edit
23+- Website available at https://real-e-state-hygo.s3-us-west-1.amazonaws.com/
+28-0buildspec.yml
@@ -0,0 +1,28 @@
1+version: 0.2
2+
3+env:
4+ variables:
5+ REACT_APP_BASE_URL: "http://localhost:5001/"
6+
7+phases:
8+ install:
9+ commands:
10+ # Install Node.js and npm (or you can use the pre-configured Node environment in CodeBuild)
11+ echo Installing dependencies...
12+ npm install -g npm@latest
13+
14+ build:
15+ commands:
16+ - cd Client
17+ - echo Running npm run build in the Client folder...
18+ - npm install # Make sure all dependencies are installed
19+ - npm run build
20+
21+ post_build:
22+ commands:
23+ # Copy the build output to your S3 bucket
24+ echo Copying build files to S3 bucket...
25+ aws s3 sync ./Client/build/ s3://your-s3-bucket-name/ --delete
26+artifacts:
27+ files:
28+ - Client/node_modules