LLazyEmail / amazon-ses-service

BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Mail for good #47

Open vadim9999 opened 4 years ago

vadim9999 commented 4 years ago

https://github.com/freeCodeCamp/mail-for-good/tree/master/server?fbclid=IwAR0m8kdqtv4uSn9ouyZA_ubb7tnJuYNERa2SyayXKrpW1IJTkOxdWQNFC1k

vadim9999 commented 4 years ago

geoip lite

vadim9999 commented 4 years ago

Development working using node version 8.17.0. node version 8.2.1. not working problem with some package in node_moules Docker -project running but when click login get redirect with internal server error

atherdon commented 4 years ago

show me how it looks :)

vadim9999 commented 4 years ago

image

atherdon commented 4 years ago

tell me more!

atherdon commented 4 years ago

looks awesome

vadim9999 commented 4 years ago

I spent 2 hours and it's still not working.

to run this project first of all need to delete ^ in package.json (lock all project dependencies). then install sass, redis-server and postgresql

but I get error when going on localhost:8080

TypeError: req.session.touch is not a function
    at ServerResponse.end (/home/vadim/js/groceristar/mail-for-good/node_modules/express-session/index.js:325:21)
    at ServerResponse.send (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/response.js:211:10)
    at apiIsAuth (/home/vadim/js/groceristar/mail-for-good/server/routes/middleware/auth.js:16:23)
    at Layer.handle [as handle_request] (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/layer.js:95:5)
    at /home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:335:12)
    at next (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:275:10)
    at _cookieSession (/home/vadim/js/groceristar/mail-for-good/node_modules/cookie-session/index.js:126:5)
    at Layer.handle [as handle_request] (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:317:13)
    at /home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:335:12)
    at Immediate.next (/home/vadim/js/groceristar/mail-for-good/node_modules/express/lib/router/index.js:275:10)
vadim9999 commented 4 years ago

I think this problem in this line code https://github.com/freeCodeCamp/mail-for-good/blob/master/server/config/server/session.js#L8 but I can't figure out why (all installed ok) npm run build complete without any error. npm start also but problem when server creates session using redis-server and express-session

atherdon commented 4 years ago

we can try something together. as it should be setup gently - we must use your machine for it can you push code at someplace? i want to try to run that code at some online sandbox - maybe I'll have luck and get the same errors you have

vadim9999 commented 4 years ago

I didn't do anything with code. I just added creds into my .env file. I don't think you will run this project on the online sandbox. You need a docker to run it or installed redis-server and postgresql.

vadim9999 commented 4 years ago

Sorry Arthur, I don't know what to do now. I don't know anything about redis-server and js library that working with a session on the server (express-session and connect-redis). Trying to fix the problem without understanding what is going on isn't a good idea. I see two variants for solving this problem:

  1. maybe I something doing wrong or redis-server not configured properly. If we need this project I can learn deeper how these libraries works. Starting from zero. create an empty project and create a server that will be creating sessions. But it can take more time. The estimation of time starts from 16- 24 hours
  2. Remove all functionality related to authentication, authorization, writing into PostgreSQL. And grub code that working with was ses. Any ideas?
vadim9999 commented 4 years ago

@atherdon