This file contains 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
FROM node:16-alpine | |
WORKDIR /front-app | |
COPY package*.json ./ | |
RUN npm install | |
# Mentioned exposed port for documentation | |
EXPOSE 4200 |
This file contains 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
// This devcontainer.json file can be generated automatically from the VS-Code itself. | |
// This is just for reference purposes. | |
// Additionally, It provides a way of how to install VS-Code extensions automatically after devcontainer launched up | |
// using "customizations" options | |
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | |
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose | |
{ | |
"name": "AirBNB-Colne with Existing Docker Compose (Extend)", |
This file contains 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
# lib/encrypted_coder.rb | |
class EncryptedCoder | |
include Crypt | |
def load(value) | |
return unless value.present? | |
Marshal.load( | |
Crypt.decrypt( | |
Base64.decode64(value))) |
This file contains 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
# lib/crypt.rb | |
module Crypt | |
class << self | |
def encrypt(value) | |
crypt(:encrypt, value) | |
end | |
def decrypt(value) | |
crypt(:decrypt, value) |
This file contains 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
class ApplicationController < ActionController::API | |
# Devise code | |
before_action :configure_permitted_parameters, if: :devise_controller? | |
# Doorkeeper code | |
before_action :doorkeeper_authorize! | |
respond_to :json | |
protected | |