Commit Graph
100 Commits
Author SHA1 Message Date
jomo 79ab296f1f get rid of path.resolve
This doesn't handle '..' and other things that
path.resolve does, but if you're passing weird
things to a URL, your fault.
2015-04-25 15:49:47 +02:00
jomo 22ea5a7e27 use iojs 1.8.x 2015-04-25 14:43:56 +02:00
jomo 1464ec81f4 update calls to changed function helpers.get_cape() 2015-04-23 23:42:20 +02:00
jomo 34adbd32d7 be more clear in docs 2015-04-22 00:35:39 +02:00
jomo c8dad9dfbb invalidate cache when skin file is gone 2015-04-22 00:31:37 +02:00
jomo 3cdcccde57 improve logging 2015-04-22 00:26:10 +02:00
jomo 7ca43e3cd9 add description for X-Storage-Type, remove debug log 2015-04-22 00:23:48 +02:00
jomo cf1119e2cb update preload images on index 2015-04-22 00:14:18 +02:00
jomo 69f0ee23be use new response module for assets
unfortunately we can't use stream pipes because we need to generate
a hash of the content for the Etag.

I think proper caching (i.e. Etag) is very important
2015-04-22 00:06:10 +02:00
jomo 2e66e5c794 add missing status for empty capes 2015-04-21 23:46:07 +02:00
jomo 244f90c4c7 fix bug with skin caching that cached capes as non-existent
when using cache.save_hash, an `undefined` skin or cape hash means "do not touch"
while `null` means "overwrite as non-existent"

this was sent to redis after calling /capes/Notch for the first time:

  "hmset" "notch" "c" "3f688e0e699b3d9fe448b5bb50a3a288f9c589762b3dae8308842122dcb81" "t" "1429651244222"
  "hmset" "notch" "s" "a116e69a845e227f7ca1fdde8c357c8c821ebd4ba619382ea4a1f87d4ae94" "c" "" "t" "1429651244235"

as you can see, the first request stores the c(ape) but does not touch the s(kin), whereas the second request
sets the s(kin) and replaces the c(ape) value
2015-04-21 23:34:14 +02:00
jomo 13169be774 use new response module for capes + more
- made sure that get_cape returns a status
- response.js returns 404 if body is empty
- 'X-Storage-Type: undefined' is no longer returned when status is `null`
2015-04-21 23:27:10 +02:00
jomo 8971e3c02b use new response module for renders + bug fixes 2015-04-21 00:57:14 +02:00
jomo a947b02c87 use new response module for skins 2015-04-20 23:18:27 +02:00
jomo 0b0882e63d use new response module for index 2015-04-20 22:19:57 +02:00
jomo 8dc55442b1 remove debug log 2015-04-20 01:12:16 +02:00
jomo d025a3004d remove always-empty first entry in req.url.path_list
rhyme pro 😎
2015-04-20 01:10:39 +02:00
jomo 0b687d8f8e correct comment about result.type 2015-04-20 00:52:08 +02:00
jomo 71a13c3bab add missing src dependency 2015-04-20 00:46:03 +02:00
jomo 3cbf73b0d7 create new response module & use it for avatars 2015-04-20 00:41:11 +02:00
jomo fce58722c8 start work on #45 2015-04-12 19:53:34 +02:00
jomo 9d2fe0c454 some logging fixes 2015-04-06 03:32:13 +02:00
jomo f6c4e62846 fix path in error message 2015-04-06 03:27:28 +02:00
jomo 67fd75b91e fix logo in readme 2015-04-06 03:25:15 +02:00
jomo 82170c1d09 be more clear about 'examples' on website 2015-04-06 03:08:49 +02:00
jomo e28451f8e7 remove debug log 2015-04-06 03:07:29 +02:00
jomo b84a65fd8e restructure directories
www.js is our 'main' file, it's now at the project's root instead of server.js
routes, views, assets are now in lib, too
2015-04-06 03:06:38 +02:00
jomo a3a77962b3 flat-square badges in readme 2015-04-05 23:20:15 +02:00
jomo a22454e6e4 Date.now() is faster (and shorter) than new Date().getTime() 2015-03-30 23:56:44 +02:00
jomo 9e3ef8087e always use etag, fixes #94 2015-03-28 01:51:59 +01:00
jomo eeb1939235 remove redundant dashes in render filenames 2015-03-27 23:25:08 +01:00
jomo 4dec71c75e only report coverage to coveralls from travis
this has the nice side effect that `npm test` effectively only runs `mocha` and has proper line numbers in stack traces
2015-03-27 23:14:30 +01:00
jomo af03fb63f8 ❤️ eslint 2015-03-27 23:12:44 +01:00
jomo 7520957b93 Use path.join() instead of + to create paths 2015-03-27 21:29:36 +01:00
jomo 48c2a55995 cache_err wouldn't be defined 2015-03-27 21:10:13 +01:00
jomo 2780ae05d3 move www.js to lib
it's not a binary, why is this in bin?
2015-03-27 09:50:54 +01:00
jomo 2cb197a717 Merge branch 'master' of github.com:crafatar/crafatar 2015-03-22 03:09:12 +01:00
jomo 0326000b42 iojs v1.6 2015-03-20 09:17:55 +01:00
jomo d4b0a335c4 return 200 for default avatars/renders/skins, fixes #111 2015-03-18 01:11:49 +01:00
jomo 13360430d9 join logs using , instead of + " " + 2015-03-15 01:57:19 +01:00
jomo 8e8ff1fe39 fix capes endpoint doc 2015-03-14 17:32:49 +01:00
jomo a294a7c57f add 128px logo, polish README 2015-03-14 17:31:35 +01:00
jomo 0b97aeee8d better style for hover previews 2015-03-14 06:56:45 +01:00
jomo 4c7da4940e remove benchmark.sh, improve bulk.sh 2015-03-14 06:37:16 +01:00
jomo dfaa79b9c7 use iojs 1.5.x, see iojs/io.js#1103 + iojs/io.js#1075 2015-03-14 01:23:16 +01:00
jomo 94fe61e076 add CORS info to website, fixes #110 2015-03-07 20:00:06 +01:00
jomo abaf3f77aa add & clean up documentation
also a small improvement for URL error logging, variable naming, and argument joining
2015-03-01 18:58:21 +01:00
jomo 912b1b2ba7 add space between badges 2015-02-27 18:59:16 +01:00
jomo a49a1c7649 iojs v1.4.1 2015-02-27 18:55:44 +01:00
jomo 48092d0422 add inch-ci for doc quality tracking 2015-02-27 18:53:47 +01:00
jomo f984b20344 mv modules/ lib/
that's what all the cool kids do
2015-02-27 18:49:39 +01:00
jomo 2972e818c7 complete that sentence 2015-02-27 01:08:39 +01:00
jomo 9c8df06c6b proper handling of steve/alex
it's more complex than just even/odd UUID
2015-02-27 01:07:09 +01:00
jomo 296d5fd8cd ez's = ez' 2015-02-22 03:02:32 +01:00
jomo 1ffe25ade9 readme contacts = website contacts 2015-02-22 02:42:53 +01:00
jomo 7be65475fe remove node.js support, fix travis tests
not sure why it's failing on travis. It does work locally with node 0.12
2015-02-22 02:39:18 +01:00
jomo 012f5bf006 merge #101, fixes #99 2015-02-22 02:27:21 +01:00
jomo 7d8b629f33 check if +type+ is present when reading from cache, fixes #101 tests 2015-02-22 02:21:35 +01:00
jomo 5e4a6d5bbe don't set undefined = null in cache.get_details; #101 2015-02-22 02:17:05 +01:00
jomo e2d038f78c oops 2015-02-21 21:17:57 +01:00
jomo 1840ea6fd7 test info in README, add verbose test option 2015-02-21 21:16:03 +01:00
jomo 6b4fcb9aea use "" instead of "." for null hashes 2015-02-21 21:08:02 +01:00
jomo ec0840794b fix tests Jake0oo0 -> Jake_0 2015-02-21 21:05:00 +01:00
jomo e093371955 only read response.statusCode if response is available 2015-02-20 19:44:28 +01:00
jomo ebd42a1e0f use iojs 1.3, fixes #103 2015-02-20 19:24:47 +01:00
jomo 4b920d57e8 reduce number of logs
some were just left in there from debugging and could be removed or set to logging.debug
some others could be compacted
a few errors were written to stdout instead of stderr
2015-02-20 01:22:37 +01:00
jomo 3910602002 updated our node-canvas fork, try again travis 😏 2015-02-20 00:53:44 +01:00
jomo 9705e84ad8 add iojs v1.2.0 to travis, fixes #100 2015-02-20 00:31:40 +01:00
jomo c0c2a63a8b disable verbose tests again 2015-02-19 01:57:55 +01:00
jomo 0e46019d40 set 60s timeout on errors; #99 2015-02-19 01:55:35 +01:00
jomo dc33912ec7 raise error on 429 TooManyRequests
this has the effect that we're not caching 'null' as a reponse. see #99
2015-02-18 23:55:34 +01:00
jomo 5b8493df15 improved comments n°2 2015-02-18 23:42:00 +01:00
jomo 71ac3db416 improved comments 2015-02-18 23:16:48 +01:00
jomo e951e9b0e7 better logging of GET requests 2015-02-18 22:42:32 +01:00
jomo 6cb4a46ac7 naming things is hard n°2 2015-02-18 21:47:17 +01:00
jomo aaedc2f3aa naming things is hard 2015-02-18 21:35:54 +01:00
jomo 6a84c5a1d0 move comment to proper position 2015-02-18 21:35:34 +01:00
jomo 16fdf8d1ac add editorconfig for .gitignore 2015-02-18 19:31:06 +01:00
jomo 3cc14ae837 improve .editorconfig 2015-02-18 19:29:41 +01:00
jomo b88db00b97 Merge branch 'master' of github.com:crafatar/crafatar 2015-02-18 19:18:09 +01:00
jomo 79ab1d0e2a correct comments 2015-02-18 19:18:05 +01:00
jomo 281cd523e6 remove unused options for GET requests 2015-02-18 19:14:59 +01:00
jomo de5bad8702 code cleanup 2015-02-14 21:58:56 +01:00
jomo 8750b863a8 contributing: add tests for fixed issues 2015-02-14 21:24:11 +01:00
jomo 2a172cc6f9 switch from node 0.12 to iojs 1.2, closes #89 2015-02-14 20:50:45 +01:00
jomo 8d6d992557 Merge branch 'master' of github.com:crafatar/crafatar 2015-02-14 20:26:22 +01:00
jomo 3fdd942c0f cache non-existing UUIDs, fixes #93 2015-02-14 20:26:09 +01:00
jomo 7ca7006736 listen on all interfaces by default 2015-02-14 02:34:24 +01:00
jomo eb8bc85ee2 Merge branch 'master' of github.com:crafatar/crafatar 2015-02-14 02:18:09 +01:00
jomo 6ecde79475 capes_dir != capes_path 2015-02-14 02:17:55 +01:00
jomo cb7f03b0b5 renders = '3D renders' 2015-02-13 21:10:53 +01:00
jomo 34e94c090e server.js should be imported, not called directly 2015-02-13 21:07:36 +01:00
jomo 99a5a34f3b fix server not starting
broken by af421ec
2015-02-13 20:48:36 +01:00
jomo c2a4b3f9f0 proper engrish 2015-02-13 20:30:54 +01:00
jomo 30c4ba200c Infinity
... relax, take your time.

JavaScript has no Integers, only Numbers. Infinity is typeof Number
2015-02-13 19:18:58 +01:00
jomo 4d1f4466fd clean up JS 2015-02-13 19:07:42 +01:00
jomo 630435fd5a update canvas module for iojs; #89 2015-02-11 01:52:08 +01:00
jomo 6d0ccef8f4 needs to be listening on 0.0.0.0 !! 2015-02-10 01:50:31 +01:00
jomo 16b33fc71d better dokku docs 2015-02-10 01:13:02 +01:00
jomo b13559d57c use logging 2015-02-10 00:44:43 +01:00