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 globals from "globals"; | |
export default [ | |
{ | |
languageOptions: { | |
ecmaVersion: 2022, | |
sourceType: "module", | |
globals: globals.node | |
} | |
} |
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
dist | |
node_modules | |
.git | |
.env | |
*.log | |
Dockerfile | |
docker-compose.yaml | |
.vscode | |
.idea | |
test |
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
echo "Switching to master branch" | |
git checkout master | |
echo "Building app..." | |
pnpm build | |
echo "Deploying files to server..." | |
scp -r dist/* app@<DOMAIN_OR_IP>:/var/www/<DOMAIN_OR_IP>/ | |
echo "Deployment done!" |
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 aws = require('aws-sdk'); | |
// Configure the AWS SDK with your credentials | |
aws.config.update({ | |
accessKeyId: 'ACCESS_KEY', | |
secretAccessKey: 'SECRET_ACCESS_KEY', | |
region: 'REGION' | |
}); | |
// Create an S3 service object |
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
services: | |
db: | |
image: mongo:4.0-xenial | |
ports: | |
- 27017:27017 | |
volumes: | |
- vidly:/data/db | |
api: | |
build: ./backend |
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
{ | |
"compilerOptions": { | |
"module": "NodeNext", | |
"moduleResolution": "NodeNext", | |
"target": "ES2020", | |
"sourceMap": true, | |
"outDir": "dist" | |
}, | |
"include": [ | |
"*" |
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
services: | |
postgres: | |
image: postgres:16.3-alpine3.20 | |
container_name: appname | |
ports: | |
- '5432:5432' | |
environment: | |
POSTGRES_DB: appname | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres |
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:20.14.0-alpine3.20 | |
WORKDIR /app | |
COPY . . | |
RUN npm install -g pnpm | |
RUN pnpm install | |
RUN pnpm generate | |
RUN pnpm migrate | |
RUN pnpm build | |
EXPOSE 3000 | |
USER node |
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 java.util.Arrays; | |
public class Main { | |
public static void main(String[] args) { | |
var shapes = Arrays.asList( | |
new Circle(3), | |
new Rectangle(5, 10), | |
new Square(5) | |
); |
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
package org.example.services; | |
import io.restassured.RestAssured; | |
import java.util.List; | |
public class APIClient<T> { | |
private final Class<T> type; | |
private final String baseUrl; | |
private final String endpoint; |
NewerOlder