Skip to content

Commit

Permalink
* update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shanghaikid committed Aug 3, 2021
1 parent 9ea35b0 commit feefdb4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
Binary file modified .github/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions server/generate-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const generateVector = (dimension) => {
return JSON.stringify(vectors);
};

while (records.length < 50000) {
const value = generateVector(4);
records.push({ vector: value, age: 10 });
while (records.length < 5000) {
const value = generateVector(128);
records.push({ vector: value });
}

csvWriter
Expand Down
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
"helmet": "^4.6.0",
"hyperlinker": "^1.0.0",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0",
Expand Down
17 changes: 15 additions & 2 deletions server/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as helmet from 'helmet';
import { NestFactory } from '@nestjs/core';
import { Logger } from '@nestjs/common';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { json } from 'body-parser';
const hyperlinker = require('hyperlinker');

/*
Milvus insight API server bootstrap function
Expand Down Expand Up @@ -32,7 +32,20 @@ async function bootstrap() {

// start listening
await app.listen(port);
Logger.log(`Milvus insight API server is running on port ${port}`);

// output server info
require('dns').lookup(require('os').hostname(), (err, add, fam) => {
// get link
// add = `127.0.0.1`;
const link = `http://${add}:${port}/api`;
const blue = `\x1b[34m%s\x1b[0m`;
const light = '\x1b[1m%s\x1b[0m';
console.log(blue, '\n Milvus insight server started.');
console.log(
light,
` View the API docs on ${hyperlinker(link, link)} \n`,
);
});
}
// Start the server
bootstrap();
5 changes: 5 additions & 0 deletions server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3198,6 +3198,11 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==

hyperlinker@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e"
integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==

iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down

0 comments on commit feefdb4

Please sign in to comment.