This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"parser": "@typescript-eslint/parser", | |
"plugins": ["@typescript-eslint"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", | |
"plugin:@typescript-eslint/recommended", | |
"prettier" | |
], | |
"env": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { render, screen } from "@testing-library/react"; | |
import Counter from "../Counter"; | |
import userEvent from "@testing-library/user-event"; | |
describe("Counter function", () => { | |
test("button clicked to increase or decrease counter", () => { | |
render(<Counter />); | |
const increment = screen.getByRole("button", { name: /Increase/i }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI-CD | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:14-alpine AS development | |
ENV NODE_ENV development | |
# Add a work directory | |
WORKDIR /app | |
# Cache and Install dependencies | |
COPY package.json . | |
COPY package-lock.json . | |
RUN npm install | |
# Copy app files | |
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:14 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied | |
# where available (npm@5+) | |
COPY package*.json ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>webpage</title> | |
</head> | |
<body> | |
<h1 style="width:50%; margin: 4em auto">Welcome to SCA Cloud School Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const app = express(); | |
const router = express.Router(); | |
const path = __dirname + "/views/"; | |
const port = 8080; | |
router.get("/", function (req, res) { | |
res.sendFile(path + "index.html"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const Colorbox = ({ color }) => { | |
let containerStyle = { | |
backgroundColor: color, | |
}; | |
return <div className="colorbox" style={containerStyle}></div>; | |
}; | |
export default Colorbox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const QuoteBox = ({ data, onclick, tweet }) => { | |
let quoteStyle = { | |
backgroundColor: "white", | |
outline: data.color, | |
}; | |
let Style = { | |
color: data.color, | |
fontSize: "20px", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import Colorbox from "../Component/Colorbox"; | |
import QuoteBox from "../Component/QuoteBox"; | |
import "./App.css"; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
color: "green", |
NewerOlder