Comments (5)
Each platform needs to have the Javascript version of the library compiled for it, so making a generic NPM will be tricky as you have found out.
I also have a Node.js project that uses libRETS. I will be sharing soon to translate RESO Web API requests into RETS calls. I used libRETS to do the RETS part. You will be able to "hack" this to answer your question. Unfortunately, I am still a few weeks away from release. How can I help you in the meantime? I put librettos.node in a [root]/lib directory and call it like this (but you probably know how it works):
…
var librets = require(__dirname + '/../lib/librets.node');
…
var session = new librets.RetsSession( {RETS_SERVER_LOGIN_URL} );
session.SetRetsVersion(librets.RETS_1_8_0);
if (!session.Login( {NAME}, {PASSWORD} )) {
var request = session.CreateSearchRequest( {TYPE}, {CLASS}, {FILTER} );
request.SetStandardNames(true);
request.SetSelect(req.query.$select);
request.SetLimit(librets.SearchRequest.LIMIT_DEFAULT);
request.SetOffset(librets.SearchRequest.OFFSET_NONE);
request.SetCountType(librets.SearchRequest.RECORD_COUNT_AND_RESULTS);
request.SetFormatType(librets.SearchRequest.COMPACT);
var results = session.Search(request);
}
…
Mark Lesswing
[email protected]
On Feb 4, 2016, at 12:06 PM, Brian Riviere [email protected] wrote:
Would anyone be able to give me suggestion on how to a create npm module so I can use in in my nodejs application?
thanks
Brian
—
Reply to this email directly or view it on GitHub.
from librets.
Right now my next challenge is getting it to work on Heroku. It appears that I will have to create a custom build package https://devcenter.heroku.com/articles/buildpacks#officially-supported-buildpacks unless there is one already created?
Brian
from librets.
So I'm trying to get libRets working on the Heroku.
I have install boost 1.54 buildpack and nodejs build packs:
heroku buildpacks
=== therightrealty Buildpack URLs
- heroku/nodejs
- https://github.com/briviere/heroku-buildpack-boost.git
The boost libs appear to installed but I keep getting an error message saying it cant find the following boost 1.54.0 file:
2016-02-19T21:42:41.671472+00:00 app[web.1]: Error: libboost_filesystem.so.1.54.0: cannot open shared object file: No such file or directory
I'm not exactly sure if boost is install correctly, the ls command does return a list of boost files:
heroku run ls /usr/lib/x86_64-linux-gnu/libboos_.so_1.54*
Running ls /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_python-py34.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.54.0 /usr/lib/x86_64-linux-gnu/libboost_wserialization.so.1.54.0 on therightrealty... up, run.1922
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_python-py34.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.54.0: No such file or directory
ls: cannot access /usr/lib/x86_64-linux-gnu/libboost_wserialization.so.1.54.0: No such file or directory
from librets.
That says that the files don't exist, or you don't have the permission to access them.
from librets.
I was finally able to get libRets node.js module working on a Heroku dyno. I had to do the following to get libBoost installed correctly.
- Add the following buildpack to you heroku project:
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-apt --index 1
- Create an Aptfile in your project base directory with the following:
libstdc++-4.8-dev
libboost1.42-dev
libboost1.46-dev
libboost1.48-dev
libboost1.49-dev
libboost1.50-dev
libboost1.52-dev
libboost1.53-dev
libboost-atomic1.54-dev
libboost-chrono1.54-dev
libboost-context1.54-dev
libboost-coroutine.54-dev
libboost-date-time1.54-dev
libboost-exception1.54-dev
libboost-filesystem1.54-dev
libboost-graph-parallel1.54-dev
libboost-graph1.54-dev
libboost-iostreams1.54-dev
libboost-locale1.54-dev
libboost-log.54-dev
libboost-math1.54-dev
libboost-mpi-python1.54-dev
libboost-mpi1.54-dev
libboost-program-options1.54-dev
libboost-python1.54-dev
libboost-random1.54-dev
libboost-regex1.54-dev
libboost-serialization1.54-dev
libboost-signals1.54-dev
libboost-system1.54-dev
libboost-test1.54-dev
libboost-thread1.54-dev
libboost-timer1.54-dev
libboost-wave1.54-dev
libboost1.54-doc
libboost1.54-tools-dev
libmpfrc++-dev
libntl-dev
-
Create a .buildpacks and include your additional buildpacks. I only have one I needed to include:
-
commit and push.
Brian
from librets.
Related Issues (20)
- C# looping using hasnext() does not go through all records HOT 1
- How to install librets to use it with python3.7.X HOT 1
- Building 1.6.6 in Ubuntu 22.04 with Python 3.10
- Missing first photoObject for MRIS HOT 6
- The type initializer for 'librets.libretsPINVOKE' threw an exception. HOT 1
- RETS or RESO Web API for keeping local database up to date? HOT 13
- Must pass MODE_NO_SSL_VERIFY as of 1.6.3 HOT 13
- ContentLength required
- Error installing LibRets package 1.6.3 on .Net Core 3.0 HOT 1
- Error after update to 1.6.3 HOT 7
- 1.6.1 or 1.6.3 and TLS 1.2 HOT 25
- Authentication errors tls1.2 HOT 5
- librets won't work with RETS 1.9.0 servers HOT 6
- Windows Build HOT 1
- libRETS-x64 1.6.3 Does not work on Windows Server x64 HOT 4
- c# or vb.net example console applications HOT 1
- libRETS-x64 1.6.3 -503 HOT 1
- java use libRETS HOT 7
- how to install librets.pm module on centos 8 for PERl Script
- RetsSession.Search(query) error: Sequence contains more than one matching element HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librets.