1.1.0 • Published 9 months ago
@smallming/webapi v1.1.0
My Webapi
A simple npm package to connect to My Server.
Installation
npm install @smallming/webapiTest
node src/test.jsHow to use
import MyClient from '@smallming/webapi';
const config = {
//baseURL: 'http://0.0.0.0:3000',
apiKey: '0194970e-1e5d-7dd3-aafe-46e5c8733d80'
};
const client = new MyClient(config);
(async () => {
try {
const helloResult = await client.getHello();
console.log('Hello 測試成功:', helloResult);
} catch (error) {
console.error('Hello 測試失敗:', error.message);
})();