Better HN
topnewbestaskshowjobs
Log inSign up

typicode

7 karma · joined Sep 23, 2013 (13y ago) · 16 submissions

Submissions

comment 1w ago · link · parent

The hardware from this era is always super interesting. Having circuitry in cartridges + in the console is wild when you think about it.

Nice to see other languages being used :)

comment 10y ago · link · parent

It's a simple trick, hotel comes with a proxy.pac file https://github.com/typicode/hotel/tree/master/docs

You can use it to tell that .dev domains should be handled by hotel :)

So there's no magic (which is often better).

And what's great is that it's optional. Hotel can still help you in your day to day development workflow even if you don't use local domains (simply go to localhost:2000 instead of hotel.dev).

comment 10y ago · link · parent

Thank you :) Which part would you like me to explain?

comment 10y ago · link · parent

Hi,

When working with many dev servers, you have to increment and remember ports (e.g. http://localhost:3000, http://localhost:4000, ...).

With hotel you can access them using their names instead (http://myapp.dev, http://myotherapp.dev, ...). Which makes things a little easier.

Some APIs requires also to be requested from an https URL, you get that for free too with hotel.

And finally, you don't have to open a terminal and type the same commands everyday. You can use your browser to manage your dev servers.

Basically, the idea of hotel is to simplify your existing workflow when working with dev servers.

5.

Show HN: Stop-server – shut down your computer using your phone and Node.js(github.com ↗)

2 points · by typicode · 11y ago · discuss

comment 11y ago · link · parent

I'm glad you find it useful :)

7.

Show HN: GHWN – Desktop notifications for GitHub(typicode.github.io ↗)

4 points · by typicode · 11y ago · 2 comments

8.

Fetchival.js – a simple window.fetch wrapper(github.com ↗)

1 points · by typicode · 11y ago · discuss

comment 12y ago · link · parent

Hi, thanks for sharing these thoughts. You're right about JSON, I'll fix that :)

10.

Load data while still loading other scripts with Pegasus(typicode.github.io ↗)

1 points · by typicode · 12y ago · discuss

11.

Automatically start development servers with katon(github.com ↗)

5 points · by typicode · 12y ago · discuss

comment 12y ago · link · parent

Just a little update. I've released LowDB 0.4.0 which is a complete rewrite of the project.

It fixes some initial flaws/bugs and includes some new features. Also, writing is now fault-tolerant and fully asynchronous.

comment 12y ago · link · parent

Actually, in my code I always start with low():

  low('foo').insert({ name: 'foo' })
  low('bar').insert({ name: 'bar' })
  low('foo').insert({ name: 'foo' })
So never really considered this way of writing or had this bug.

But I can see that it's a flaw and unexpected behavior. I'm adding this to the enhancements for the next version.

Thanks for spotting it :)

comment 12y ago · link · parent

Hi everyone,

First, thanks for all the interest, it’s quite sudden and unexpected.

Actually, LowDB is an extract from JSON Server, a mocking REST server based on plain JSON (https://github.com/typicode/json-server).

So, basically, it's not meant to be used in critical / intensive applications.

Instead, it's much more a new convenient way to store data in simple use cases.

Regarding file writing, if your database is small or if you don't run a cluster of Node processes, you should be fine.

Regarding benchmark, as someone pointed it out, it’s mainly to show that storing to JSON file is fast enough and to compare operations speed. I agree that it says nothing about other databases and LowDB doesn't try to be the fastest either, just fast enough. By the way, 'npm run benchmark' lets you run it on your machine.

However, keep in mind too that LowDB official release is quite recent so it should be improved over time.

Anyway, thanks for all the feedbacks and I hope you’ll have fun with it :)