Extern classes for Mongoose and MongoDB nodejs driver.
- Install and make available in the command line NodeJS
- Create a Javascript project.
- Run
haxelib install HxMongo
(once this lib has been added to haxelib)
- See the quickstart guide below.
- The installations should make all necessary tools available.
- Develop your application and compile it in a
.js
- Run
nodejs your_app.js
and you are done!
- This package needs
NPM
manager: (remember to install)mongodb
mongoose
(optional)
MongoDB driver quickstart guide Mongoose quickstart guide
- Install MongoDB.
- Edit
src/com/dal/mongotest/MongoTest.hx
with your server domain and user credentials. - Run
haxelib git hxnodejs https://github.com/HaxeFoundation/hxnodejs.git master
- Run
haxelib install promhx
- Make sure you have the necessary compilers. e.g. For Ubuntu:
sudo apt-get install build-essential
- Within "test/build" directory run
npm install
to fetch and build native MongoDB driver for node.js - Run
haxe build.hxml
- From the "test/build" directory run
node main.js