Skip to content

marioantonini/fms-xml-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fms-xml-client

A Promise based FileMaker Server XML gateway client for node.js. note! Becuase of CORS issues with FileMaker server this is only useful in node. It will not work in the browser.

Goals

Make it easy to make request to FileMaker Server's xml gateway. We may add some convenience function in the future, but right now you just construct an options object with the following properties and pass it to the client.

  • server - the server url
  • auth - an object with "user" and "pass" properties
  • command - an object that describes the XML Gateway command

Usage

const client = require('fms-xml-client');
const options = {    
    server : "<serverURL>",
    auth : {
        user : "admin"
        pass : "pass"
    },
    command : {
      '-db' : 'Test',
      '-findall' : true,
      '-lay' : 'people'
    }
}

// make the request
client(options)
    .then(json=>{
        // do stuff with son
    })
    .catch(err=>{
        // do stuff with error
    })

Command Object

All off the FileMaker XML Gateway command and parameters are supported in the command object.

All of the query commands are documented in the FileMaker® Server 15 Custom Web Publishing Guide starting on paging 37.

Running the Test

You'll need to put the Test.fmp12 file on a FileMaker Server.

We use dotenv for setting the required ENV variables. You can see the required vars in test/required.en. Copy the file to test/.env and set the vars correctly.

.env is never committed to git

finally run npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%