To get the main branch in your local project as it is on the original repository, follow these steps:
-
Fetch the latest changes from the remote:
git fetch origin
-
Switch to the main branch:
git checkout main
import react, {useRef, useState} from "react"; | |
const SimpleInput = (props) => { | |
const [enteredName, setEnteredName] = useState('') | |
const [enteredNameIsValid, setEnteredNameIsValid] = useState(true) | |
const nameInputChangeHandler = event => { | |
setEnteredName(event.target.value) | |
} |
// before importing app and supertest | |
// you should write jest.mock function | |
// with the first argument is the path of your | |
// actual middleware and second argument write a | |
// fake middle function. | |
jest.mock('../middleware/verifyToken', () => { | |
return jest.fn((req, res, next) => { | |
next() | |
}) |
To get the main branch in your local project as it is on the original repository, follow these steps:
Fetch the latest changes from the remote:
git fetch origin
Switch to the main branch:
git checkout main
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
server { | |
server_name website.com www.website.com; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 40 | |
proxy_pass http://localhost:8000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; |
import Log from "../model"; | |
import { ILogs } from "../types"; | |
export const createALog = async (tenantId: string, table: string, logId: string, options: any) => { | |
const args = {TenantID: tenantId, Table: table, logId} | |
return await Log.create(args, options) | |
} |