The frontend app that powers app.codecrafters.io.
You will need the following things installed on your computer:
- Git
- Node.js (with npm)
- Ember CLI
- Google Chrome
You can run tests locally without a backend server, but to use the app you'll also need an instance of
codecrafters-io/core running. You can either run this against staging,
or against a local instance of core. Visit the core repo for setup instructions.
git clone <repository-url>this repositorycd frontendnpm install- Copy
.env.exampleto.envand fill in the values
make serve- Visit your app at https://.ccdev.dev.
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
- Run
BACKEND_URL="https://backend-staging.codecrafters.io" npm run start - View your app at http://localhost:4200
- FastBoot is enabled when running
ember build --environment=production- Pre-rendering is done only for routes configured under
prembersection inember-cli-build.js
- Pre-rendering is done only for routes configured under
- FastBoot is enabled for all routes when running
ember server- To disable it, run
FASTBOOT_DISABLED=true ember server - Alternatively, append
?fastboot=falsequery parameter to each request URL
- To disable it, run
- Add
FASTBOOT_DISABLED=trueto your local.envfile to disable FastBoot completely- You can override it by passing
FASTBOOT_DISABLED=""in the command line
- You can override it by passing
- NPM task
startruns with FastBoot disabled - NPM task
start:fastbootruns with FastBoot enabled
- Run
make serve, ensure your server is running - View your tests at http://localhost:4200/tests/index/html?moduleId=abcd.
- Select the module(s) you want to run from the dropdown at the top right of the page & click "Apply" to run tests.
- To run all tests, remove the
?moduleId=abcdquery parameter from the URL.
npm run lintnpm run lint:fix
- Run
ANALYZE_BUNDLE=true ember server --environment=production
npm exec ember build(development)npm run build(production)
- This app is automatically deployed to app.codecrafters.io when a commit is merged into main.
- Each branch is also deployed to a preview URL via Vercel.