You need to install eslint and some other config libs.
yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier -D
yarn eslint --init
.eslintrc.js
| [Unit] | |
| Description=Puma Rails Server | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=deploy | |
| WorkingDirectory=/home/deploy/app/current | |
| ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb | |
| ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop |
| http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
| http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
| #payload: [{"kind"=>"person"}] | |
| Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
| #data: {"interest"=>["music", "movies", "programming"]} | |
| Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
| Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
| Segment.where("jsonb_array_length(data->'interest') > 1") |
Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
| const mongoose = require('mongoose'); | |
| const { MongoMemoryServer } = require('mongodb-memory-server'); | |
| // Define a new instance of "MongoMemoryServer" to automatically start server | |
| let mongoServer; | |
| // For mongodb-memory-server's old version (< 7) use this instead: | |
| // const mongoServer = new MongoMemoryServer(); | |
| const opts = { |
This will guide you through setting up a replica set in a docker environment using.
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!