I’m trying to execute a background server previously to execute a curl test for the node API. Here’s the config.yml file I’m using:
version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: background server for tests
command: npm start
background: true
- run:
name: test
command: curl -i http://localhost:3010/api/public
But I keep receiving “step was canceled” on the “background server for tests” step. Can you please advice?