cbleek / JobArchiveNodesJsServer

NodesJS Server implementing the JobArchive API
https://archive.yawik.org
0 stars 0 forks source link

NodesJS Server implementing JobArchive #1

Open cbleek opened 5 years ago

cbleek commented 5 years ago

In https://github.com/cbleek/JobArchive/issues/1 we've created an initial JobArchive API.

Now we want to see, how this kan be implemented in nodesjs. Storage will be a Firebase

tpikachu commented 5 years ago

Dear, Carsten. Do you know some about Firebase?

tpikachu commented 5 years ago

As you can see in Firebase console there are database and storage. But in this job we don't need to use storage. Storage is used for saving file something like images, books... when user upload something. We should only use database because there are no files in this job. But to use Firebase we should create an project in Firebase Console.

cbleek commented 5 years ago

I dont know Firebase. But I've just created a free Database.

tpikachu commented 5 years ago

test mode or locked mode? And also you can see, there are 2 types of database, Realtime database and Google firestore. In this time I recommend Google firestore.

tpikachu commented 5 years ago

Please invite me this project. I'll push my code here directly.

tpikachu commented 5 years ago

Thank you. I'll start work from tomorrow. I'll provide full time work for you. So I need at least 40h/w.

cbleek commented 5 years ago

please commit early.

Because I have no experience with nodejs, the first thing I wanted to know is how to test nodes code per travis.

tpikachu commented 5 years ago

I'd know about where will you deploy this backend?

cbleek commented 5 years ago

your recommendation?

tpikachu commented 5 years ago

AWS

tpikachu commented 5 years ago

But at this moment, deploying backend is not important. We can do this after backend code is done. So I'll push my code to your repo and you can just download and test it in your local server. And I'll write some notes about test in Readme.md

tpikachu commented 5 years ago

I can't commit because your repo is empty. Please create anything in your repo.

cbleek commented 5 years ago

I can provide a VM (LXC) or a VM (kvm) with Docker. But I have no experiences with Docker.

I want to avoid AWS, because they have not free plans for developes. All free AWS products are limited in time. AFIK

tpikachu commented 5 years ago

I'm not familiar with Docker.

cbleek commented 5 years ago

I'm deploying things with travis using rsync. I think, we'll start this way.

tpikachu commented 5 years ago

Can we use skype to discuss?

tpikachu commented 5 years ago

I think I'm not an expert in deploying. And it will take long time to learn that.

cbleek commented 5 years ago

I've cloned it on api.yawik.org

We can use this as an official domainname of the endpoint.

https://api.yawik.org/

tpikachu commented 5 years ago

Please publish this code to https://api.yawik.org/ and test it.

  1. Sign up: server will send confirm email. And you should click link in your mail. When you click link in your email this call GET/validateemail automatically. And server will set 'verified' field '1' in your firesotre.

  2. Sign In: server will send token to you if your email and password correct. and then with that token you can call other api. When you call other api not using token server will refuse that.

  3. Log out: server will add token to blacklist so that token will be not useful.

  4. /api/user -get: server will send your profile if you are signed in. -put: server will update your profile with request. -delete: server will delete your profile and add token to blacklist. So that token will be not useful.

  5. /api/addjoblink: server will add joblink with request. And also add posted_userid.

  6. /api/listlinks: server will send joblinks depends on 'type' field in request query. when type is 'all', will send all joblinks and not 'all', wee send only user's joblinks.

cbleek commented 5 years ago

Can you please remove the credentials from source.?

https://github.com/cbleek/JobArchiveNodesJsServer/blob/master/src/services/sendemail.js#L14

I'll change the password and send it to you in an PM

tpikachu commented 5 years ago

Ok. I've just removed that and committed. But did you have a test?

tpikachu commented 5 years ago

Check that.