Credits from: https://tutsforweb.com/installing-laravel-homestead-on-windows-step-by-step/
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
{ | |
"name": "my-project", | |
"version": "1.0.0", | |
"description": "", | |
"keywords": [], | |
"license": "ISC", | |
"author": "", | |
"scripts": { | |
"clean": "pnpm run bin:unlink && pnpm m exec -- rm -rf node_modules; rm shrinkwrap.yaml; rm -rf node_modules", | |
"reset": "pnpm run clean && pnpm m install && pnpm run bin:link", |
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
"use strict"; | |
/** | |
* @param {typeof import("./commander").Command} program Commander Instance | |
*/ | |
module.exports = function(program) { | |
return program | |
.command("greet [name]") | |
.description("A greet command.") | |
.action((name) => { |
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
<?php | |
#namespace My\Namespace\Libraries; | |
use InvalidArgumentException; | |
use Monolog\Formatter\LineFormatter; | |
use Monolog\Handler\RotatingFileHandler; | |
use Monolog\Logger; | |
use Monolog\Logger as MonologLogger; | |
use Monolog\Handler\StreamHandler; |
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
"use strict"; | |
const _ = require("lodash"); | |
module.exports = { | |
call(next) { | |
return function(actionName, params, opts = {}) { | |
if (!opts.meta) { | |
opts.meta = {}; | |
} |
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
"use strict"; | |
const _ = require("lodash"); | |
const Sequelize = require("sequelize"); | |
const SequelizeDbAdapter = require("moleculer-db-adapter-sequelize"); | |
/** | |
* DbAdapter | |
*/ | |
class DbAdapter extends SequelizeDbAdapter { |
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
"use strict"; | |
var MAILTRAP_API = "xxxxxxxxxxxxxxxxxxxxxxx"; | |
var MAILTRAP_INBOX = 12345; | |
var _ = require("lodash"); | |
var request = require('request'); | |
var baseURL = "https://mailtrap.io/api/v1/"; | |
var headers = { |
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
"use strict" | |
const _ = require("lodash"); | |
const { ServiceBroker } = require("moleculer"); | |
const mergeConfig = (config = null) => { | |
if (config && _.isString(config)) { | |
config = require(config); | |
} else if (config && _.isObject(config) && _.keysIn(config, "configFile")) { | |
let filePath = config.configFile; |