Skip to content

Instantly share code, notes, and snippets.

View harshq's full-sized avatar
👋

Harshana Abeyaratne harshq

👋
View GitHub Profile

React.js software engineer practical test

In this practical test, we build a simple CRUD application called 🍔 The Fridge. We use this application to see what we have in our fridge at a glance and when do they expire.

Please read the instructions properly before you proceed.

⚙️ Tech Stack to be used

  • React.js (Latest)
  • SASS Stylesheets (scss)
@harshq
harshq / main.go
Created October 17, 2021 08:05
Simple http api lambda handler in Go
package main
import (
"encoding/json"
"fmt"
"github.com/aws/aws-lambda-go/events"
runtime "github.com/aws/aws-lambda-go/lambda"
)
@harshq
harshq / test-api.go
Last active October 17, 2021 06:23
aws-cdk with Golang
package main
import (
"github.com/aws/aws-cdk-go/awscdk"
"github.com/aws/aws-cdk-go/awscdk/awsapigatewayv2"
"github.com/aws/aws-cdk-go/awscdk/awsapigatewayv2integrations"
"github.com/aws/aws-cdk-go/awscdk/awslambdago"
"github.com/aws/constructs-go/constructs/v3"
"github.com/aws/jsii-runtime-go"
)
@harshq
harshq / webpack.config.js
Last active July 25, 2021 07:49
React with Webpack 5
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const PORT = 3001;
module.exports = {
entry: path.resolve(__dirname, "./src/index.js"),
devServer: {
contentBase: path.join(__dirname, "dist"),
port: PORT,
@harshq
harshq / package.json
Created July 25, 2021 07:00
Module federation with Webpack 5
...
"scripts": {
"start": "webpack serve --open --mode development",
"build": "webpack --mode production",
"serve": "serve dist -p 3001",
"clean": "rm -rf dist"
},
...
@harshq
harshq / babel.config.json
Created July 25, 2021 06:54
Module federation with Webpack 5
{
"presets": ["@babel/preset-env", ["@babel/preset-react", {
"runtime": "automatic"
}]]
}
@harshq
harshq / webpack.config.js
Created July 25, 2021 06:43
Module federation with Webpack 5
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
const dependencies = require("./package.json").dependencies;
const PORT = 3001;
module.exports = {
entry: path.resolve(__dirname, "./src/index.js"),
devServer: {
module.exports = {
en: {
linkGroups: [
{
id: 229,
name: 'Electronics',
links: [
{
name: 'Desktop Computers',
slug: 'desktop-computers',
service: sls-server
frameworkVersion: '2'
plugins:
- serverless-webpack # serverless webpack plugin
package:
individually: true # to package functions individually. You can toggle this and check the difference webpack generates
custom:
@harshq
harshq / tsconfig.json
Last active October 8, 2021 04:14
serverless tsconfig
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"lib": ["esnext"],
"sourceMap": true,
"outDir": "lib",
"moduleResolution": "node",
"removeComments": true,
"noImplicitAny": true,