mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
* Add envoy proxy * Add frontend, still not working * Open port to frontend * Fix static html page * Fix url in client js code, but CORS is still blocked * Successfully make request from browser to sqkserver through proxy * Expose ports for sqkserver in docker * Remove unused frontend files * Remove duplicate envoy config file
33 lines
1 KiB
JavaScript
33 lines
1 KiB
JavaScript
/**
|
|
*
|
|
* Copyright 2018 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* https://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
*/
|
|
|
|
const {HelloRequest,
|
|
HelloReply} = require('./proto/squeak_admin_pb.js');
|
|
const {SqueakAdminClient} = require('./proto/squeak_admin_grpc_web_pb.js');
|
|
|
|
var client = new SqueakAdminClient('http://' + window.location.hostname + ':8080',
|
|
null, null);
|
|
|
|
var request = new HelloRequest();
|
|
request.setName('World');
|
|
|
|
console.log('Testing...');
|
|
|
|
client.sayHello(request, {}, (err, response) => {
|
|
console.log(response.getMessage());
|
|
});
|