Comments (5)
First, you need to install mongodb and set connection details in app.js
. Then, calling loadExampleData should load your database.
from node-oauth2-server-mongo-example.
thanks , its working now.
from node-oauth2-server-mongo-example.
Can't seem to call loadExampleData for some reason even after DB connected I have added the following to the app.js
import loadExampleData from './model.js';
and I get this error
from node-oauth2-server-mongo-example.
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1027:15)
at Module._compile (node:internal/modules/cjs/loader:1063:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
from node-oauth2-server-mongo-example.
This issue was closed, but I think you are calling the function from outside model.js. You should modify that file to add a call to the local function.
from node-oauth2-server-mongo-example.
Related Issues (9)
- Invalid grant: refresh token is invalid HOT 1
- MongoDB atlas? HOT 1
- can this play nicely with Next-authJS HOT 3
- switch to client credentials grant type HOT 17
- HTTPS instead of HTTP HOT 1
- REQ : upgrade oidc HOT 2
- scope implementation HOT 1
- Can't generate refresh token with grant type refresh_token HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-oauth2-server-mongo-example.