# Upstash
Serverless Database for Redis
Start free in 30 seconds (opens new window)
# Always Free Without Credit Card
- Max 10,000 Commands Daily
- Max 256 MB Data Size Per DB
- Max 20 Concurrent Connections
# Quick Start
// hello-world.mjs
import redis from 'redis';
const client = redis.createClient({
host: 'us1-x-instance.upstash.io',
port: '33310',
password: 'change-the-password',
tls: {}
});
client.on('error', function (error) {
console.error(error);
});
client.set('learn', 'redis', redis.print);
client.get('learn', redis.print);
client.quit(redis.print);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Library: https://github.com/xetorthio/jedis
public static void main(String[] args) {
Jedis jedis = new Jedis("us1-x-instance.upstash.io", 33310, true);
jedis.auth("change-the-password");
jedis.set("foo", "bar");
String value = jedis.get("foo");
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8