This file contains hidden or 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
version: '3.4' | |
volumes: | |
postgres_data: | |
driver: local | |
services: | |
postgres: | |
image: postgres:14.1 | |
container_name: keycloak-nodejs-example-postgres |
This file contains hidden or 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:18 AS build | |
WORKDIR /opt/{your app name} | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build --build-arg CACHEBUST=${CACHEBUST} | |
FROM nginx:latest | |
COPY --from=build /opt/{your app name}/build /usr/share/nginx/html | |
EXPOSE 81 | |
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains hidden or 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> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<script> | |
tailwind.config = { | |
theme: { |
This file contains hidden or 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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; | |
export const fetchIssues = createAsyncThunk<string[], void, { rejectValue: string }>( | |
"githubIssue/fetchIssues", | |
async (_, thunkAPI) => { | |
try { | |
const response = await fetch("https://api.github.com/repos/github/hub/issues"); | |
const data = await response.json(); | |
const issues = data.map((issue: { title: string }) => issue.title); | |
return issues; |
This file contains hidden or 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> | |
<head> | |
<!-- Page title --> | |
<title>Event Page</title> | |
<!-- Other possible tags --> | |
<script></script> | |
<style></style> | |
<!-- Can specify document base URL --> |
This file contains hidden or 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 mongoose from 'mongoose'; | |
const dbUri = "Your mongo DB URI" // This should be prick from .env file | |
export default async () => { | |
await mongoose.connect(dbUri,{}) | |
.then(() => { | |
console.log('Mongodb Connection to database'); | |
}) | |
.catch(err => { |