2014-05-25 12:05:19 +02:00
# Homework
2014-06-01 15:42:02 +02:00
Schoolwork management application for students. Built using
2014-06-01 21:26:10 +02:00
[Meteor ](http://github.com/meteor/meteor ), a Web App framework on top of Node.js
2014-06-01 15:42:02 +02:00
and MongoDB.
I built this because I felt like the other apps didn't do it very well.
Also, I learnt a lot and had fun!
2014-05-25 12:05:19 +02:00
2014-05-27 15:33:50 +02:00
### Try it
[the app is hosted online! ](http://homework.meteor.com )
### Development
2014-09-24 10:38:36 +02:00
Clone the repo, [install meteor ](http://meteor.com ), `cd` to the directory
then run `meteor` .
That's it.
2014-06-01 15:42:02 +02:00
If you want to send emails (necessary to confirm users) you need to set the
2014-09-24 10:38:36 +02:00
`MAIL_URL` environment variable, or else the emails will just be printed on
stdout. The process is
2014-09-27 09:42:30 +02:00
[explained on the Meteor docs ](http://docs.meteor.com/#email ).
2014-06-01 15:42:02 +02:00
2014-10-04 09:14:28 +02:00
In the mails sent by Homework, the website links point to the `ROOT_URL`
environment variable as
[explained on the Meteor docs ](http://docs.meteor.com/#meteor_absoluteurl ).
2014-05-25 12:05:19 +02:00
2014-10-09 17:01:57 +02:00
You'll probably also need [phantomjs ](http://phantomjs.org/ ) installed
since the apps now depends on Meteor's
[spiderable ](http://docs.meteor.com/#spiderable ) package.
2015-03-02 16:37:40 +01:00
#### Twitter and/or Facebook Authentication
Create a `.json` file with this content:
```json
{
"facebook": {
"appId": "your_facebook_app_id",
"secret": "your_facebook_app_secret"
},
"twitter": {
"consumerKey": "your_twitter_app_token",
"secret": "your_facebook_app_secret"
}
}
```
2014-10-09 16:46:23 +02:00
2015-03-02 16:37:40 +01:00
Then run or deploy your application using the `meteor` argument `--settings`
followed by a space and the path to your json file.
2014-10-09 16:46:23 +02:00
2015-03-02 16:37:40 +01:00
__Example:__ `meteor --settings file.json` or `meteor deploy homework --settings file.json`
The application will automatically adapt and show login buttons as needed.
2014-10-09 16:46:23 +02:00
2015-03-10 09:55:08 +01:00
#### RESTful API
To enable the __RESTful API__ on your server, just add this to your `.json` settings file (as explained in the section above):
```json
"public": {
"enableAPI": true
}
```
Your users will now be able to set API keys and use them, also enabling the use of the [Homework Command Line Client ](http://github.com/fazo96/homework-cli ).
2014-05-25 12:05:19 +02:00
### License
2014-05-27 15:33:50 +02:00
The MIT License (MIT)
2015-03-02 15:55:29 +01:00
Copyright (c) 2014-2015 Enrico Fasoli
2014-05-27 15:33:50 +02:00
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.