@utrolig
Full stack development with NodeJS/Aurelia
Nothing here yet.
Nothing here yet.
No blogs yet.
I think it would be better to just create an application separately. Just making things like a simple project management tool or a game, anything that shows off your skillset. Then you can open-source it and maybe someone can actually use it. WIN/WIN!
Thanks! I've started having a look. The main reason I asked which I should've noted in the post, is that I was afraid I'd learn 'bad practices' that I would have to re-learn once I start writing an actual application (With Redux etc). Maybe not? I just see so many different approaches when it comes to Angular f.ex.
From the docs it looks like you have to import the actual model, and not refer to it by string. Try something like this? var Account = require ( './account.js' ); var Project = require ( './project.js' ); var User = require ( './user.js' ); module .exports = baseModel => baseModel.extend({ tableName: 'access_tokens' , keyable() { return this .morphTo( 'keyable' , Account, Project, User); } });
I usually place regex validation on the input forms. For example in Norway, mobile-phone numbers are 8 numbers. If 8 numbers are input, I do a quick get-request to check if that phone number is taken. If its not taken, I show a green checkmark, if its taken, I mark the field red. Same with emails. As for the objects returned, I only throw 401 when Authentication fails or token is invalid. I usually respond with 200 and Success JSON { success : true, data: { id: 1 , name: 'Bill Gates' } } Error JSON { success : false, msg: 'E-mail already taken.' }