http://localhost:9200/_cat/indices?v
PUT indexName
version: '3.1' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:5.3.1 | |
ports: | |
- '2181:2181' | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 |
import { AxiosError } from "axios"; | |
/** | |
* Decorator for service instance methods that does ajax calls | |
* @param {string} message - ajax operation name | |
* @param {any=} defaultData - optional default data to return if ajax call fails | |
*/ | |
export function axiosError(message: string, defaultData?: any) { | |
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { | |
const originalMethod = descriptor.value; |
syntax = "proto3"; | |
option go_package = "protos/"; | |
message Msg { | |
string Text = 1; | |
} | |
service Echo { | |
rpc Hello(Msg) returns(Msg); |
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/opentracing/opentracing-go" | |
"github.com/uber/jaeger-client-go" | |
"github.com/uber/jaeger-client-go/config" | |
) |
// $ node dep.js | |
var fs = require("fs"); | |
function main() { | |
var packageJsonFile = "package.json"; | |
var packageData = JSON.parse(fs.readFileSync(packageJsonFile)); | |
console.log("devDependencies:"); |
This is study path related to microservices. It is not a study path on programming, if you want to improve in this sense please take a look at this.
find ./ -type f | grep .DS_Store | xargs rm |
// Try/Catch Basics | |
try { | |
//something that causes an error | |
} catch (err){ | |
// error data | |
console.log(err.name) | |
console.log(err.message) | |
// checking for specific type | |
console.log(err instanceof(ReferenceError)) |