Code Monkey home page Code Monkey logo

johndatserakis / koa-vue-notes-api Goto Github PK

View Code? Open in Web Editor NEW
364.0 364.0 67.0 5.68 MB

🤓 This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Features MySQL integration, user authentication, CRUD note actions, and async/await.

Home Page: https://koa-vue-notes-web.innermonkdesign.com/

License: MIT License

JavaScript 66.22% HTML 9.23% Dockerfile 1.06% Shell 1.05% TypeScript 22.44%
api backend boilerplate database demo jwt koa mysql node pm2 spa template

koa-vue-notes-api's People

Contributors

johndatserakis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koa-vue-notes-api's Issues

ie 11 error

Hi. How can fix the problem with ie11, from windows 7?
i have this string error "SCRIPT5022: [vuex] vuex requires a Promise polyfill in this browser."

Trouble running on windows

Hi John,

I'm having some trouble running under Windows (10).

Initially, I had trouble getting NODE_ENV set, but I fixed that in package.json by adding 'set' in front of the NODE_ENV directive. Interestingly, i tried using 'cross-env', but it didn't work. Weird.

Now I'm trying to do 'npm run watch', but getting the following:

[email protected] watch C:\xampp\htdocs\koa-notes-api
set NODE_ENV=development & nodemon app.js --exec

[nodemon] 1.12.0
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node app.js

C:\xampp\htdocs\koa-notes-api\src\index.js:3
import Koa from 'koa'
^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:74:10)
    ....
    at Object.<anonymous> (C:\xampp\htdocs\koa-notes-api\app.js:12:13)

I'm running node 8.x, so it shouldn't be an ES2015 thing surely? I know this is not really your problem, but do you perhaps have any ideas I can try?

[Q] docker-compose - what are apache & php containers for?

Hi, first off thanks for the amazing example program.

My question is pretty much as in the title - this is our backend service, what are those services declared in docker-compose for?

I'm especially curious about why php image is included.

Question

First of all Thank You for sharing this repo, this is the most complete koa stater I could find.
Can I skip redis setup until deployment ?

using docker-compose to run the program but can't get access to the localhost:4000 port

hi , I'm new to koa. After running docker-compose up -d --build under the koa-vue-notes-api-develop directory,the console's output is:
屏幕截图 2023-10-13 142126

However,after running the front-end part, when I tried to login:

屏幕截图 2023-10-13 153607

May be I didn't correctly understand the readme file ?

I don't know what happeded. So I gave up using docker,but try to just using npm to start the backend, however:

屏幕截图 2023-10-13 152550

I think it might be caused by the different version of nodejs?

I would be greatful if you can help me

need help

so i am a windows 10 user, and i really new to use docker, and i use sqlyog for sequel pro replacement, so i had this problem ,
[nodemon] 1.17.5
[0] [nodemon] to restart at any time, enter rs
[0] [nodemon] watching: .
[0] [nodemon] starting node app.js
[0] [nodemon] restarting due to changes...
[0] [nodemon] starting node app.js
[1] > Starting dev server...
[0] Server running at 4000
[0] Running in development v2.0.0
[0] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[0] at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
[0] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[0] at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
[0] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379

i know that related with docker, but i dont understand to use it, can you help me?
anyway i miss it too: "development environment, koa_vue_notes_development and koa_vue_notes_testing. In your production environment you would just have koa_vue_notes_production"
that s your read.me text about db, im dont understand what must i made and where , sorry for my bad programming skill . can you help me?

Token in User

Hi. First thanks for sharing your work.Its been a great inspiration for learning koa and vue.

I don't really get what this token in the user model/controller is doing? Maybe I missed something but it seems that it is genreated but not used.

//Now let's generate a token for this user
request.token = await this.generateUniqueToken()

Issue Running on Windows 10

Trying to run this on windows 10, changed the watch in package.json to

"watch": "SET NODE_ENV=development & nodemon app.js --exec",

This looks like it works but then I get an error.

`

SET NODE_ENV=development & nodemon app.js --exec

[nodemon] 1.17.5
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node app.js
\api\src\index.js:3
import Koa from 'koa'
^^^

SyntaxError: Unexpected identifier
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
[nodemon] app crashed - waiting for file changes before starting...
`

I dont know if its recognizing the import statement, im on latest version of Node.
What do I need to do to get this to run?

Thanks

p2 supports hot reload

Hi John, nice work you have here, I am just looking the same stuff and what you have done is very helpful, thank you. You should check that pm2 supports hot reload with watch, so there is no need to use noDaemon I think. I can send you an example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.