The front-end 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 frontend
npm install
- Copy
.env.example
to.env
and 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
prember
section 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=false
query parameter to each request URL
- To disable it, run
- Add
FASTBOOT_DISABLED=true
to your local.env
file to disable FastBoot completely- You can override it by passing
FASTBOOT_DISABLED=""
in the command line
- You can override it by passing
- NPM tasks
start
andstart:ember
run with FastBoot disabled - NPM tasks
start:fastboot
andstart:ember:fastboot
run 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=abcd
query parameter from the URL.
npm run lint
npm 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.