generated from hyper63/adapter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from hyper63/twilson63/feat-run-harness-5
feat: successfully running harness (#5)
- Loading branch information
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
// Harness deps | ||
export { default as appOpine } from "https://x.nest.land/[email protected]/mod.js"; | ||
export { default as core } from "https://x.nest.land/[email protected]/mod.js"; | ||
|
||
// Schema parsing deps | ||
export { default as validateFactorySchema } from "https://x.nest.land/[email protected]/utils/plugin-schema.js"; | ||
export { data as validateDataAdapterSchema } from "https://x.nest.land/[email protected]/mod.js"; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { MongoClient } from "./deps.js"; | ||
import adapter from "./adapter.js"; | ||
import { adapter } from "./adapter.js"; | ||
import PORT_NAME from "./port_name.js"; | ||
|
||
export default (mongoUrl) => ({ | ||
id: "mongodb", | ||
port: PORT_NAME, | ||
load: async () => { | ||
const client = new MongoClient(); | ||
return await client.connect(mongoUrl); | ||
await client.connect(mongoUrl); | ||
return await client; | ||
}, // load env | ||
link: (env) => (_) => adapter(env), // link adapter | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { appOpine, core } from "../dev_deps.js"; | ||
import myAdapter from "../mod.js"; | ||
// Harness deps | ||
import { default as appOpine } from "https://x.nest.land/[email protected]/mod.js"; | ||
import { default as core } from "https://x.nest.land/[email protected]/mod.js"; | ||
|
||
import mongo from "../mod.js"; | ||
import PORT_NAME from "../port_name.js"; | ||
|
||
const hyperConfig = { | ||
app: appOpine, | ||
adapters: [ | ||
{ port: PORT_NAME, plugins: [myAdapter("mongodb://127.0.0.1:27017")] }, | ||
{ port: PORT_NAME, plugins: [mongo("mongodb://127.0.0.1:27017")] }, | ||
], | ||
}; | ||
|
||
|