{
- "outputPath": "dist/piggybank",
+ "outputPath": "functions/dist/piggybank",
- "outputPath": "dist/piggybank-server",
+ "outputPath:": "functions/dist/piggybank-server",
}| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: myproject | |
| name: myproject | |
| namespace: default | |
| spec: | |
| progressDeadlineSeconds: 600 | |
| replicas: 1 |
I'm loving Angular, but running unit tests on Karma gets my nerves. It's too slow for me.
In this post, I explain mechanics under Angular's testing module and how to improve the performance.
To evaluate Angular unit testing performance I captured the CPU profiling with running Karma.
| /* Client side, works in Chrome 55 and Firefox 52 without transpilation */ | |
| //https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/ | |
| async function fetchURLs() { | |
| try { | |
| // Promise.all() lets us coalesce multiple promises into a single super-promise | |
| var data = await Promise.all([ | |
| /* Alternatively store each in an array */ | |
| // var [x, y, z] = await Promise.all([ | |
| // parse results as json; fetch data response has several reader methods available: | |
| //.arrayBuffer() |
| var localStorageMock = /* ... some mock code ... */ | |
| Object.defineProperty(window, 'localStorage', { | |
| value: localStorageMock | |
| }); | |
| import './app/index.module'; | |
| import 'angular-mocks'; | |
| import './app/mock/utils'; |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
Step-by-Step Guide how to install CI/CD with Docker Registry On Ubuntu 14.04 LTS from scratch.
- Install Docker using Official Manual or just run:
sudo bash
apt-get update
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D| check host redis.host with address 127.0.0.1 | |
| if failed port 6379 protocol redis then alert | |
| check process redis-server with pidfile "/var/run/redis/redis-server.pid" | |
| start program = "/etc/init.d/redis-server start" | |
| stop program = "/etc/init.d/redis-server stop" | |
| if failed host 127.0.0.1 port 6379 then restart | |
| if 5 restarts within 5 cycles then timeout |
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.
- Make sure you have registered a domain name.
- Sign up for CloudFlare and create an account for your domain.
- In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
- From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
- If you