#express

Apollo Server 3 後,將 graphql-playground 改為自家的 apollo-studio, 當你一開啟

http://localhost:{YOUR_DEV_PORT} 時,它會主動導頁到 https://studio.apollographql.com

一開始用的時候,覺得特別好用,apollo-studio 的 auto-complete 的功能比 graphql-playground 好用許多,但是做到登入的功能時遇到這個問題困擾我超久,明明就有給 set-cookie 的 header,但是怎麼樣都拿不到 cookie

閱讀更多......

Express Concept

Express is a bunch of middlewares works together

Expresss Basic Routing

const express = require('express');
const app = express();

app.get('/register', (req, res) => {
const body = req.body;
const isSucceed = auth(body);
if (isSucceed) {
res.send('Register Successfully');
} else {
res.status(443).sene('Authentication fail, unable to register');
}
});

閱讀更多......

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×