generation
$ node index.js <AWS cognito user pool ID> <relative/output/path.js>
generates the following file shape
module.exports = {
generation
$ node index.js <AWS cognito user pool ID> <relative/output/path.js>
generates the following file shape
module.exports = {
it can be frustrating but it was likely left out because writing a CLI is predicated by having seen this notation used in the documentation when using a CLI.
to answer your question though (and a bit extra because i was there once too):
when you see $
this is almost always used to indicate that everything after the $
is a single line to paste into the command line (shell) and hit enter. it will usually be in this general form
$ program command <required arg> [optional arg]
const fs = require("fs"); | |
const https = require("https"); | |
const fetch = url => | |
new Promise((res, rej) => { | |
try { | |
https.get(url, res); | |
} catch (error) { | |
rej(error); | |
} |
sudo: true | |
language: node_js | |
cache: npm | |
node_js: "10.15.3" | |
before_install: | |
- sudo apt-get --yes remove postgresql\* | |
- sudo apt-get install -y postgresql-11 postgresql-client-11 | |
- sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf | |
- sudo service postgresql restart 11 | |
- npm i |
PORT=8008 | |
OTHER_VAR='stuff' |
require('dotenv').config(); | |
const mongoose = require('mongoose'); | |
const { MONGO_URI, MONGO_DB } = process.env; | |
const mongo_db = mongoose.createConnection(`${MONGO_URI}${MONGO_DB}`); // moved to global space | |
describe('User.formSubmit() Mutation', () => { | |
let user; | |
beforeAll(async (done) => { | |
user = await models.User.create(userMock()); |
describe('User.formSubmit() Mutation', () => { | |
beforeAll(async (done) => { | |
await mongoose.connect(`${MONGO_URI}${MONGO_DB}`, { useNewUrlParser: true }); | |
done(); | |
}); | |
afterAll(async (done) => { | |
await mongoose.disconnect(); | |
done(); | |
}); |