Loading views...
express mongoose feather

express mongoose feather

Date
Date
2020 Mar 30 0:0 → 2020 Mar 31 0:0
Created by
Created by
Seonglae ChoSeonglae Cho
Created time
Created time
2023 Feb 28 12:39
Last edited by
Last edited by
Seonglae ChoSeonglae Cho
Last edited time
Last edited time
2023 Apr 15 16:51
Refs
Refs
notion image
 
 
notion image
 
logger 로 windston 쓰는데 info 에서 debug로 바꾸기
 
코드가 jwt 많이 보이는데 개념공부
JWT(JSON Web Token)에 대해서... :: Outsider's Dev Story
작년에 JSON Web Token(JWT)에 대한 글을 올렸다. 당시에는 JWT 처음 사용해 보면서 적은 글이라 그제야 약간 이해한 상황이었지만 시간이 지나면서 더 알게 된 부분도 있고 스펙상 달라진 부분도 꽤 생긴 관계로 유지보수 차원에서 추가로 글을 쓰게 됐다. 이전 글을 쓴 지 1년도 채 지나지 않았지만, 그 사이에 많은 내용이 달라졌을 정도로 당시의 JWT는 초기 상태였다.
JWT
여기에 정리
 
흠 상당히 어렵다 일단 mongoose rest api 부터 구현해보기로

auth 를 지금 구현할지부터 정해야할듯

일단 나중에
 
 
 
 
 
hooks 에서는 함수 실행 순서 연결해주는 거고
service 에서 실제 서비스들어오는 건데
class 만들어서 인스턴스로 연결시켜준다
상당히 node 같지 않고 oop같은 느낌?
 
 
notion image
app 사용 순서 안지키면
 
notion image
에러남 ㅠ
feathersjs/docs
"Services" are the heart of every Feathers application. Services are JavaScript objects (or instances of ES6 classes) that implement certain methods. Feathers itself will also add some additional methods and functionality to its services. Service methods are pre-defined CRUD methods that your service object can implement (or that have already been implemented by one of the database adapters).
feathersjs/docs
서비스에 대한 이해 상속개념
 
notion image
 
notion image
header 에 authorization 넣어야함
 
 
OAuth2
npm install feathers-authentication-oauth2 --save feathers-authentication-oauth2 is a server side module that allows you to use any Passport OAuth2 authentication strategy within your Feathers application. There are hundreds of them! Some commonly used ones are: This module contains 2 core pieces: The main initialization function The Verifier class In most cases initializing the module is as simple as doing this: This will pull from your global authentication object in your config file.
예제들 발결
 

Migration


expressjs/compression
Node.js compression middleware. The following compression codings are supported: This is a Node.js module available through the npm registry. Installation is done using thenpm install command: $ npm install compression Returns the compression middleware using the given options. The middleware will attempt to compress response bodies for all request that traverse through the middleware, based on the given options.
expressjs/compression
  • exporess 빨라지게?
 
'local' authentication strategy requires a 'usernameField' settingh - Google Search
Username and password authentication strategy for Passport and Node.js. ... The strategy requires a verify callback, which accepts these credentials and calls done ... passport.use(new LocalStrategy({ usernameField: 'email', passwordField: ... is not necessary, it can be safely disabled by setting the session option to false.
  • config 는 root 에 있어야 하더라
 
notion image
api 등록 안되고 authentication api 등록 안되는 거도 다 순서때문 후...
 
 
 
 
notion image
Why after upgrade feathersjs I receive error: MethodNotAllowed
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
Why after upgrade feathersjs I receive error: MethodNotAllowed
 
 
multi control
Why after upgrade feathersjs I receive error: MethodNotAllowed
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
Why after upgrade feathersjs I receive error: MethodNotAllowed
여기 보는데 <database> 이게뭐지
Migrating | FeathersJS
This guide explains the new features and changes to migrate to the Feathers v4 (Crow) release. It expects applications to be using the previous Feathers v3 (Buzzard). Instead of separate versioning, all modules in the @feathersjs namespace have been updated to use the same version number.
이거보니 알겠다 block 에만 멀티 넣어주기
 
 
watch middleware
  • good start 로 수정
 
 
hashid
niieani/hashids.js
A small JavaScript library to generate YouTube-like ids from numbers. - niieani/hashids.js
niieani/hashids.js
hash id 안되서 cjs 로
 
 
autoincrement
mongoose 자동 증가(auto increment)
안녕하세요.!! Lotts 입니다 😉 기존 mysql에서 사용하는 auto increment를 mongoDB에서도 사용하려 합니다. 👏 👏 첫째. npm을 이용하여 auto increment를 설치합니다.
mongoose 자동 증가(auto increment)
autoincrement collect만들고 처리하는듯
 
 
class 안에 model 사용하면 되는군
 
 
 
uuid
uuidjs/uuid
For the creation of RFC4122 UUIDs Complete - Support for RFC4122 version 1, 3, 4, and 5 UUIDs Cross-platform - Support for ... CommonJS, ECMAScript Modules and UMD builds Node 8, 10, 12 Chrome, Safari, Firefox, Edge, IE 11 browsers Webpack and rollup.js module bundlers React Native Secure - Cryptographically-strong random values Small - Zero-dependency, small footprint, plays nice with "tree shaking" packagers CLI - Includes the uuid command line utility Upgrading from uuid@3?
uuidjs/uuid
 
 
 

Recommendations