- Endpoint URL Definition
- Postman API Documentation
- Issue tracking via Github Issues
- Git Methodologies
- Frequent small commits
- Push task to branch whether complete or incomplete at end of day
- Single issue per Gitflow feature branch
Also known as layered defense, defense in depth is a security principle where single points of complete compromise are eliminated or mitigated by the incorporation of a series or multiple layers of security safeguards and risk-mitigation countermeasures.
Have diverse defensive strategies, so that if one layer of defense turns out to be inadequate, another layer of defense will hopefully prevent a full breach.
A security principle that aims to maintain confidentiality, integrity and availability by defaulting to a secure state, rapidly recovering software resiliency upon design or implementation failure. In the context of software security, fail secure is commonly used interchangeably with fail safe, which comes from physical security terminology.
class Recipe { | |
int mango; | |
int milk; | |
int sugar; | |
Recipe(this.mango, this.milk, this.sugar); | |
int makeMangoShake() { | |
return mango+milk+sugar; | |
} |
import BaseSeeder from '@ioc:Adonis/Lucid/Seeder' | |
import Database from '@ioc:Adonis/Lucid/Database' | |
import SettingsCity from 'App/Models/SettingsCity' | |
export default class SettingsCitiesSeeder extends BaseSeeder { | |
public async run() { | |
const citiesData = [ | |
{ | |
city_label: 'Agege LGA', | |
state_id: 25, |
function payloadGeneratorForViewAndApi(data: object | any[], viewTemplate: string, apiResponseMessage: string) { | |
const viewDataPayload = { | |
viewTemplate: viewTemplate, | |
outputData: { data } | |
} | |
const apiDataPayload = { | |
statusCode: 200, | |
statusMessage: 'Success', | |
responseMessage: apiResponseMessage, |
import View from "@ioc:Adonis/Core/View" | |
import { | |
ApiDataPayloadStructure, | |
OutputTypeStructure, | |
ViewDataPayloadStructure | |
} from "App/Interfaces/viewAndApiOutputInterfaces" | |
function viewAndApiOutputHelper(outputType: OutputTypeStructure, viewDataPayload: ViewDataPayloadStructure, apiDataPayload: ApiDataPayloadStructure) { | |
if (outputType === 'html') { | |
return View.render(viewDataPayload.viewTemplate, viewDataPayload.outputData) |
export interface ViewDataPayloadStructure { | |
viewTemplate: string | |
outputData: object | |
} | |
export interface ApiDataPayloadStructure { | |
statusCode: number | |
statusMessage: string | |
responseMessage: string | |
outputData: object |
Route.get('posts', async ({ request, view }) => { | |
const posts = [ | |
{ | |
title: 'Adonis 101', | |
}, | |
] | |
switch (request.accepts(['html', 'json'])) { | |
case 'html': | |
return view.render('posts/index', { posts }) |