This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedWriter; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.FileWriter; | |
| import java.io.IOException; | |
| import java.io.ObjectOutputStream; | |
| import java.text.MessageFormat; | |
| import javax.swing.JFileChooser; | |
| import javax.swing.JOptionPane; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export CLANG_MODULES_BUILD_SESSION_FILE=/Users/dawitabera/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation | |
| export CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING=YES | |
| export CLANG_WARN_BOOL_CONVERSION=YES | |
| export CLANG_WARN_COMMA=YES | |
| export CLANG_WARN_CONSTANT_CONVERSION=YES | |
| export CLANG_WARN_DIRECT_OBJC_ISA_USAGE=YES_ERROR | |
| export CLANG_WARN_EMPTY_BODY=YES | |
| export CLANG_WARN_ENUM_CONVERSION=YES | |
| export CLANG_WARN_INFINITE_RECURSION=YES | |
| export CLANG_WARN_INT_CONVERSION=YES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: serverless-restapi | |
| frameworkVersion: '2' | |
| provider: | |
| name: aws | |
| runtime: nodejs14.x | |
| stage: ${opt:stage} | |
| region: us-east-1 | |
| lambdaHashingVersion: 20201221 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mongoose = require('mongoose'); | |
| mongoose.Promise = global.Promise; | |
| module.exports = connectDataBase = async () => { | |
| try { | |
| const databaseConnection = await mongoose.connect(process.env.DB, { | |
| useUnifiedTopology: true, | |
| useNewUrlParser: true, | |
| useCreateIndex: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('dotenv').config({ path: './.env' }); | |
| const isEmpty = require('lodash.isempty'); | |
| const validator = require('validator'); | |
| const connectToDatabase = require('./db'); | |
| const Note = require('./models/Note'); | |
| /** | |
| * Helper function | |
| * @param {*} statusCode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('dotenv').config({ path: './.env' }); | |
| const isEmpty = require('lodash.isempty'); | |
| const validator = require('validator'); | |
| const connectToDatabase = require('./db'); | |
| const Note = require('./models/Note'); | |
| /** | |
| * Helper function | |
| * @param {*} statusCode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mongoose = require('mongoose'); | |
| const validator = require('validator'); | |
| const NoteSchema = new mongoose.Schema( | |
| { | |
| title: { | |
| type: String, | |
| required: true, | |
| validator: { | |
| validator(title) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .... | |
| provider: | |
| .... | |
| apiGateway: | |
| apiKeys: | |
| - free: | |
| - ${opt:stage}-freekey | |
| - paid: | |
| - ${opt:stage}-prokey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❯ npm install -g serverless |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| … | |
| "scripts": { | |
| "lint": "./node_modules/eslint/bin/eslint.js .", | |
| "release": "release-it", | |
| "version": "auto-changelog - template changelog.hbs -p && git add CHANGELOG.md", | |
| "test": "serverless-bundle test" | |
| }, | |
| … |
OlderNewer