Add a .env
file to the root directory of this repo, with
SERVER_PORT=3000
MONGODB_HOST=127.0.0.1
MONGODB_PORT=27017
MONGODB_USER=mongodb
MONGODB_PASS=mongodb
MONGODB_DB=lgtmeme
LOCAL_FILE_SERVER_PORT=8000
LOCAL_FILE_SERVER_ROOT_DIR=files
S3_BUCKET_NAME=sandbox-memes.lgtmeme.com
S3_REGION=us-west-2
Make sure MongoDB is running. Use something like adminMongo to setup user and database.
Then run
yarn install # install dependencies
yarn server:debug # run debug version of server
Download and run Docker for Mac to host the prerequisite service dependencies, like the Mongo database.
Using Visual Studio Code, run tasks:
docker:mongo
(this runs a mongo server on port 2701)docker:adminmongo
(this runs the adminmongo dashboard)
Then use the Debug panel to run Server
, Test (all)
or Test (current)
.
Precommit hooks are auto enabled to check for flow
errors and use prettier
to format files.
Install flow
typings: yarn types:install
. Run yarn flow:watch
to
constantly check for flow errors.
Install the recommended flow
and prettier
extensions recommended by Visual Studio Code. Flow will run automatically and Prettier will run on file save.
After building the extension, load dist/chrome-extension
from Chrome Extensions with Developer Mode enabled. On every build, refresh the extension in the Extensions panel to apply the new build.
Run yarn build:chrome
.
Run task npm: build:chrome
.