mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
WIP: Integrate permissionless app into setup hooks
This commit is contained in:
parent
9d541d8f27
commit
b2d1685b06
@ -13,8 +13,7 @@
|
||||
"dev:debug": "nodemon --exec babel-node --inspect=0.0.0.0:9229 src/index.js",
|
||||
"lint": "eslint src --config .eslintrc.js",
|
||||
"test": "nyc --reporter=text-lcov yarn run test:jest",
|
||||
"test:jest": "$npm_package_config_no_auth run-p --race start test:cmd:jest",
|
||||
"test:cmd:jest": "jest --forceExit --detectOpenHandles --runInBand",
|
||||
"test:jest": "cross-env PERMISSIONS=disabled jest --forceExit --detectOpenHandles --runInBand",
|
||||
"test:coverage": "nyc report --reporter=text-lcov > coverage.lcov",
|
||||
"db:script:seed": "wait-on tcp:4001 && babel-node src/seed/seed-db.js",
|
||||
"db:script:reset": "wait-on tcp:4001 && babel-node src/seed/reset-db.js",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { request } from 'graphql-request'
|
||||
import fetch from 'node-fetch'
|
||||
|
||||
export const host = 'http://127.0.0.1:3123'
|
||||
export const host = 'http://127.0.0.1:4123'
|
||||
|
||||
export async function authenticatedHeaders ({ email, password }) {
|
||||
const mutation = `
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
const createServer = require('../../dist/server.js').default
|
||||
let app
|
||||
let permissionlessApp
|
||||
|
||||
const setup = async function () {
|
||||
const server = createServer()
|
||||
app = await server.start({ port: 3123 })
|
||||
app = await server.start({ port: 4123 })
|
||||
|
||||
const permissionless = createServer()
|
||||
permissionlessApp = await server.start({ port: 4001 })
|
||||
}
|
||||
|
||||
const teardown = async function () {
|
||||
await app.close()
|
||||
await permissionlessApp.close()
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@ -13,7 +13,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||
}
|
||||
|
||||
const client = new ApolloClient({
|
||||
link: new HttpLink({ uri: process.env.GRAPHQL_URI, fetch }),
|
||||
link: new HttpLink({ uri: 'http://localhost:4001', fetch }),
|
||||
cache: new InMemoryCache()
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user