A quickstart for a webapp built with
create a redis database
add your redis credentials to server/src/index.ts
const client = redis.createClient({
url: 'redis://redis-[...].cloud.redislabs.com:1234',
password: ''
});
set a secret for the express-session
app.use(session({
secret: '',
...
})
set the passport types in static.d.ts
to be accessed on the ExpressRequest
and Response
object
declare namespace Express {
export interface Request {
user: {
id: string
email: string
};
logout: ()=>any
}
export interface Response {
...
}
}
gcloud config set project [GCP PROJECT ID]
gcloud run deploy server --image gcr.io/[GCP PROJECT ID]/server
```