Matteo Pagliazzi
8ec69b4f83
improve(i18n): move translations to their own module, use i18n from habitrpg-shared, @djuretic i have remove the tests because the code is now handled in habitrpg-shared, we may add them back there
2014-05-06 20:04:09 +02:00
Tyler Renelle
25c0b3e32a
fix(favicon): specify favicon, fixes #3331
2014-05-06 09:18:44 -06:00
Tyler Renelle
a608419bba
feat(coupons): add coupon-code feature
2014-04-16 23:28:37 -06:00
Tyler Renelle
440a2e2884
refactor(subscriptions): move all payments stuff to it's own controller
2014-03-24 21:51:20 -06:00
Tyler Renelle
b8a6366d1a
Revert "chore(cluster): set max #cores to 1 for now (we're maxing memory again)"
...
This reverts commit 3f5221755c .
2014-03-17 13:09:35 -06:00
Tyler Renelle
3f5221755c
chore(cluster): set max #cores to 1 for now (we're maxing memory again)
2014-03-13 10:10:45 -06:00
Matteo Pagliazzi
fef858d555
refactor(caching): cache emojis and remove gemoji from bower
2014-02-12 15:21:40 +01:00
Tyler Renelle
00c8a7f757
chore(cluster): max 2-core
2014-02-07 14:18:04 -07:00
Tyler Renelle
e404f35705
Revert "chore(cluster): temporarily disable cluster (revert here)"
...
This reverts commit e36d3264be .
2014-02-07 14:17:48 -07:00
Tyler Renelle
e36d3264be
chore(cluster): temporarily disable cluster (revert here)
2014-02-06 20:12:52 -07:00
Tyler Renelle
2837edd51f
chore(cluster): use domain-middleware properly, so domains are used to restart cluster workers
2014-02-06 10:58:47 -07:00
Tyler Renelle
2786b36206
fix(mongoose): typo
2014-02-03 18:14:17 -07:00
Tyler Renelle
6a86da316b
chore(mongoose): set some options per #2725 to address high number of open connections, replset connection timeout, and close mongoose connection on process death
2014-02-03 17:57:38 -07:00
Cole Gleason
e3b5a3978a
chore(logging): change disconnect message level from error to info
2014-02-03 01:25:54 -06:00
Tyler Renelle
ac5ef440fe
chore(merge): Merge remote-tracking branch 'colegleason/disconnect' into develop
...
Conflicts:
src/utils.js
2014-02-02 23:42:59 -07:00
Cole Gleason
85eb0aa38a
chore(cluster): disconnect worker on error, then kill after 30 sec
...
(cc @lefnire): This disconnects the process, sets up a kill timer, and
then sends error emails and responses back to the client. This should
stop new clients from connecting to the dead worker, allow connections
already established to finish, and cause the master to fork a new worker
to pick up the slack immediately.
2014-02-03 00:00:58 -06:00
Cole Gleason
71f4371d9c
chore(logging): add Newrelic and Email transports for Winston
...
This will send an email on errors logged with winston and thus removes
the old error emailing code.
2014-02-01 02:46:22 -06:00
Cole Gleason
4494600d92
chore(logging): replace console.* with new logging module
2014-02-01 02:01:19 -06:00
Tyler Renelle
87d196b038
chore(throttling): throttle in dev too
2014-01-31 11:11:16 -07:00
Tyler Renelle
1faec250d8
chore(throttling): throttle all requests, not just API requests. Since
...
we're 120req/min, this shouldn't pose an issue for normal usage. #2645
2014-01-31 10:47:41 -07:00
Tyler Renelle
92563915ef
chore(throttling): add api-throttling (request limiting) so users can
...
only request routes 120times per minute (aka, 2req/second but spread out
for sanity). fixes #2645
2014-01-31 10:32:33 -07:00
Tyler Renelle
8a42e0c392
chore(logging): no production logging (how did this commit get removed?)
2014-01-30 17:21:17 -07:00
Tyler Renelle
4f02ccb3b0
chore(cluster): kill & respawn pids on cluster fail, using domain-middleware
2014-01-30 17:01:13 -07:00
Tyler Renelle
7c3d85dbbe
chore(cluster): try cluster again
2014-01-30 17:00:56 -07:00
Tyler Renelle
6f2f3dd71e
chore(newrelic): some newrelic code location experiments
2014-01-30 13:43:30 -07:00
Tyler Renelle
85e2ce5c4a
chore(logging): don't log in production
2014-01-30 11:04:43 -07:00
Tyler Renelle
5b06392879
chore(newrelic): add newrelic
2014-01-30 11:04:39 -07:00
Tyler Renelle
53917bc9f0
chore(cluster): remove all cluster code, just in case
...
`require('cluster')` is flagging issues, even if not in use. Revert this
in the near future when we can peg VersionError. @colegleason
2014-01-30 10:19:04 -07:00
Tyler Renelle
b0fc17bae5
chore(cluster): @colegleason I'm disabling cluster for now, people are
...
reporting more issues on develop (VersioError & 503) than before. Can
revert his commit in the near future, want to investigate a bit though
2014-01-19 14:52:57 -08:00
Tyler Renelle
7a479098dc
fix(tests): don't use cluster in tests, else we get "connection refused"
2014-01-18 10:55:56 -07:00
Cole Gleason
2e62cc675b
perf(cluster): user NodeJS cluster module to use all CPU cores
...
This makes the server.js file fork workers for the number of CPUs on the
system. Each worker will then bind to the MongoDB and Express
ports. They are really all using the same connection through the master
process, but this lets the logic happen in seperate threads. I do worry
that we may see more VersionErrors if one user makes more concurrent
API requests. That really isn't the fault of cluster though, as that
issue still would have been present in the previous single-core version.
2014-01-17 01:55:10 -06:00
Tyler Renelle
a2b30dcb1a
#2217 merge apiv2 route definitions with swagger decorations
2014-01-01 20:21:46 -07:00
Tyler Renelle
0edcfac46b
#2217 start adding APIv2 generated documentation via swagger-node-express
2014-01-01 15:33:37 -07:00
Tyler Renelle
1d6679298d
server: move config => utils, send headers along with error. Trying to
...
find out if some of these errors are mobile / not my own apps. Some
requests are malformed, but hitting apiv2's batch-api, i don't see how
this could be happening since both web and mobile are built to use apiv2
properly, unless a 3rd-party is trying to use apiv2 batch-api, but that
seems unlikely
2013-12-28 14:52:21 -07:00
Tyler Renelle
2332b15a55
add more details to errorHandler email
2013-12-27 12:22:26 -07:00
Tyler Renelle
e6e961f991
#2135 remove connect-domain commented-out examples
2013-12-26 22:39:40 -07:00
Tyler Renelle
1b8cba1945
#2135 use domain-middleware to handle top-level error-handling so we can
...
email admins UUIDs
2013-12-26 22:38:52 -07:00
Tyler Renelle
f60166301e
mongo auto_reconncet option
2013-12-16 09:00:49 -07:00
Tyler Renelle
259f9033c4
APIv2: add paths /api/v2/* and /api/v1/*. v1 has limited deprecated routes (only the things I know currently work), and we'll notify 3rd-partyists to migrate to apiv2 once it's documented and tested
2013-12-15 17:54:34 -07:00
Nick Gordon
b958103447
Merge branch 'develop' of https://github.com/snicker/habitrpg into develop
2013-11-15 06:20:37 -08:00
Nick Gordon
7bf1bf2af0
data export commit, supports exporting task history via csv
...
*adds the following new dependencies: moment, express-csv
*recommend replacing functionality of 'relative-date' with features from 'moment'
*supports retrieval of CSV history via the API and in browser
**/api/v1/export/history (requires typical API authorization)
**/export/history.csv (requires session authorization)
*adds new routes for data export
2013-11-15 06:18:16 -08:00
Matteo Pagliazzi
6e33b88c85
remove middleware.splash
2013-11-12 15:10:16 +01:00
Matteo Pagliazzi
1d9148eebb
move middleware.locals only where it is needed and transform it into a common function, simplify translations and adds automatic language detection
2013-11-12 14:49:01 +01:00
Tyler Renelle
1d5296880b
Merge pull request #1750 from HabitRPG/paglias/build-manifest
...
Paglias/build manifest
2013-11-05 10:29:12 -08:00
Matteo Pagliazzi
fbf57bde66
Merge branch 'develop' of https://github.com/HabitRPG/habitrpg into develop
2013-11-05 19:24:36 +01:00
Matteo Pagliazzi
5b9002820f
replace express.bodyParser with express.json & express.urlencoded since it is deprecated in connect 3.0
2013-11-05 19:24:11 +01:00
Tyler Renelle
ee35d16f4d
temporary log-suppressing so i can diagnose live a bit better
2013-11-05 09:34:09 -08:00
Matteo Pagliazzi
d0c29eba78
move js & css files to public/manifest.json, allow for stylus files editing without restarting server on development, removed hashres from dev build
2013-11-04 22:13:03 +01:00
Tyler Renelle
fa25f3d300
challenges: WIP beginning challenges feature. some basic CRUD & some
...
basic subscribe / unsubscribe functional (but buggy)
2013-10-28 11:34:07 -07:00
Matteo Pagliazzi
21823564c2
add caching
2013-09-10 14:40:00 +02:00