0.0.7 • Published 9 years ago
evt-xtrm v0.0.7
Evt-xtrm
Install evt-xtrm module
$ npm install evt-xtrm --saveCreate your database
You can use a local database or external such as mlab.com.
Local MongoDB
- Install mongodb https://docs.mongodb.com/v3.0/administration/install-on-linux/
 - create db user
 
$ mongo evt-xtrm-db --eval 'db.createUser({user: "test", pwd: "test", roles: [ { role: "readWrite", db: "config" } ]});'External MongoDB
Just export your connection url to environment
$ export MONGO_URL=[your mongodb url]Set up your server
server = require('evt-xtrm')({
	passport: {
		enable: true,
		permissionSecurity: true,
		secret: [your secret for passport],
		facebook: {
			enable: truem
			AppID: [app id], //Option could be set in environment
			AppSecret: [app secret] //Optional could be set in environment
		},
		baseUrl: [Base url] //Optional is localhost by default.
	}
});
// then use your server!
server.get(...Environment variables
Here is a list of environment variables you could set
$ export PORT=[Port to listen on]
$ export FACEBOOK_APPID=[AppID]
$ export FACEBOOK_APPSECRET=[AppSecret]How to obtain facebook App ID and Secret
Create a new app on https://developers.facebook.com/. Remember to set on your Site URL(http://localhost:10010 for dev)
How to contribute
$ git clone https://github.com/Eskalol/evt-xtrm.git
$ cd evt-xtrm
$ npm install -g swagger
$ npm installRun swagger and swagger browser:
$ swagger project start
$ swagger project editCheck the issue tracker.
Tips
- When playing with swagger it's recomended to use these settings:
 
require('evt-xtrm')({
	passport: {
		enable: true,
		permissionSecurity: false,
		...
	}
});Rest of the settings is optional. The reason why permissionSecurity should be set to false is because we are using a custom middleware which is not integrated with swagger. This is just a temporary solution and will be fixed when swagger implement cookie session auth.