Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • in reply to: Express.js Sessions – A Detailed Tutorial #155

    Yaapa
    Keymaster

    It would be definitely possible, but I am not aware of any implementation yet. The reason Redis and MongoDB are chosen is because they are faster and simpler to set up than MySQL, for data set like user sessions.

    in reply to: Express.js Sessions – A Detailed Tutorial #139

    Yaapa
    Keymaster

    You can initialize the session in the login route. Check if the user submitted the proper creds, and initialize the session accordingly.

    You can check if a session has ended by looking at session variables, which are expected to be there. If they are not present, there is no session.

    in reply to: Additional info #120

    Yaapa
    Keymaster

    Ah, yes! I made the classic mistake of assuming the readers know would. Making a post to clarify it. Thanks!

    in reply to: Errata ? #119

    Yaapa
    Keymaster

    Not really errata, it is a common practice for instantiating a class which does not require any arguments. If JSLint does not give you an option for making this optional, you could try JSHint – http://www.jshint.com/ – it is the more customizable fork of JSLint.

    in reply to: RxJS with express #99

    Yaapa
    Keymaster

    Will definitely try to cover the topic a little later. Thanks for the suggestion.

    in reply to: Cluster with session warning mesg #96

    Yaapa
    Keymaster

    Most welcome!

    in reply to: Errata Out of Sync #95

    Yaapa
    Keymaster

    Noted and updated on the Forum.

    in reply to: Errata #91

    Yaapa
    Keymaster

    Thanks for reporting.

    in reply to: Domain handler on error handler #87

    Yaapa
    Keymaster

    The example on Page no. 201 is a complete example using an Express app.

    in reply to: process.process.exit(1) #85

    Yaapa
    Keymaster

    Errata. Thanks for reporting.

    in reply to: Cluster with session warning mesg #84

    Yaapa
    Keymaster

    MemoryStore is used for storing session data by default, which uses the app process’ memory. Since cluster processes can’t share session data, they will all be working with their own individual copies of session. This will result in a very erratic behavior from the app.

    The workaround is to use an external memory store like RedisStore or MongoStore. You can read the details on page 184-185.

    in reply to: Is there a PDF / Ebook version available? #70

    Yaapa
    Keymaster

    Welcome to the forums, Avinash. Glad you found what you were looking for!

    in reply to: Stateless REST APIs #57

    Yaapa
    Keymaster

    Hi Chris,

    Check out Restify for a API-specific HTTP service module.

    People use REST and RESTful in varying degrees of ‘RESTness’, I am not quite sure which degree you are coming from. Read this interesting article, “Your API is not RESTful“, to get the context.

    Implementing a truly and wholly RESTful API in any platform is going to be a substantial effort. However, resourceful routing (Chapter 3, page 73) is very REST-like. You can secure it by the use of session or API token, depending on the nature of your client.

    All the best!
    Yaapa

Viewing 13 posts - 1 through 13 (of 13 total)