Naysayers Promote Misery

    @windingtree/org.id-test-http-server
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.4 • Public • Published

    @windingtree/org.id-test-http-server

    @windingtree/org.id-test-http-server

    Simple Http Server for ORGiD protocol testing

    Setup

    npm install @windingtree/org.id-test-http-server

    Usage

    import HttpFileServer from '@windingtree/org.id-test-http-server';
    
    // HttpFileServer can be used for testing cases where it is required to host files
    const httpServer = new HttpFileServer();
    httpServer.start()
      .then(() => {
        const file = {
          type: 'json',
          path: '<path_with_name>.json',
          content: '{"test": "test"}'
        };
        httpServer.addFile(file);
    
        const { data } = await axios.get(`${httpServer.baseUri}/${file.path}`);
        console.log(data);
        // {"test": "test"}
    
      })
      .catch(console.error);

    Documentation

    Generated docs

    Install

    npm i @windingtree/org.id-test-http-server

    DownloadsWeekly Downloads

    4

    Version

    1.2.4

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • valera_rozuvan
    • kostysh
    • kvakes
    • tomashq