Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhyuen/now-serverless-circleci
https://github.com/rhyuen/now-serverless-circleci
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rhyuen/now-serverless-circleci
- Owner: rhyuen
- Created: 2020-02-18T03:19:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T01:24:46.000Z (almost 2 years ago)
- Last Synced: 2023-10-12T15:29:00.429Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 9.74 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/rhyuen/now-serverless-circleci.svg?style=svg)](https://circleci.com/gh/rhyuen/now-serverless-circleci)
# ABOUT
An attempt at using `CircleCI` with Zeit's `Now` and `Typescript`.
# Issues
1. Connection for HTTP requests in tests are always refused when run in CircleCI but not when the tests are run locally.
2. It seems that `jest` sets `NODE_ENV` to `test` by default. [source:stackoverflow](https://stackoverflow.com/questions/48461394/node-env-with-jest)
# Things I've tried
> 1. Switching between localhost and 127.0.0.1 in the target url.
> 2. Using the `beforeAll(() => {})` call in one of the jest tests.
> 3. Adding the `.now` folder fields to the CircleCI build environment to make the 'project not linked to NOW' error field go away.
> 4. Found this [link](https://discuss.circleci.com/t/cant-connect-to-node-http-server-running-on-localhost/19857/8) that gets an ip address. It looks promising.
# Resolved Issues
SOLN:
32 commits later and it works.
You need two commands instead of one.
> $ now dev --listen 8080 & wait-on tcp:8080
> $ npm run test