jsbin/Makefile
Aron Carroll 592a23b6c3 Add a handle serve command to the makefile
Will optionally load config.node.json if it exists. Run using:

    $ make serve
2012-06-10 13:47:16 +01:00

19 lines
527 B
Makefile

# Use nodemon if available or fallback to node.
RUN = [ -e "`which nodemon`" ] && nodemon --debug . || node --debug .
NODE_CONFIG = $(PWD)/config.node.json
all:
git submodule init
git submodule update
php ./build/build.php
# Run the node server using a custom config file to save updating the two
# when working on both the node and php versions. Just create a
# config.node.json file and it will be loaded instead.
serve:
ifneq ($(wildcard $(NODE_CONFIG)),)
export JSBIN_CONFIG=$(NODE_CONFIG); $(RUN)
else
$(RUN)
endif