- Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
npm install --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
npm install --dev jest babel-jest @babel/preset-env @babel/preset-react
exports.deleteUser = async (req, res, next) { | |
const session = await mongoose.startSession(); | |
try { | |
const { id } = req.params; | |
// Start session | |
await session.startTransaction(); | |
// deleteMany in this session | |
const [errorOp, result] = await toAll([App.deleteMany({ user: id }).session(session), UserModel.findByIdAndRemove(id).session(session)]); | |
if (errorOp) { | |
throw new ErrorRequest(STATUS_CODE.UNPROCESSABLE, errorOp.message); |
See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
/** set up our navbar, and position it fixed so there is no white gap above the CS content **/ | |
.x-navbar { | |
border: none; | |
box-shadow: none; | |
transition: background 0.7s ease-out; | |
background: transparent!important; | |
position: fixed; | |
z-index: 1030; | |
top: 0; |
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args))) | |
// Usage : compose functions right to left | |
// compose(minus8, add10, multiply10)(4) === 42 | |
// | |
// The resulting function can accept as many arguments as the first function does | |
// compose(add2, multiply)(4, 10) === 42 |