Skip to content

Whether you're using an ORM or straight SQL, you can get started with SingleStore (formerly MemSQL) fast. Here's an introductory sample of using SingleStore with Node and JavaScript. This sample includes all the CRUD methods: Create, Read by id, Read all, Update, and Delete.

License

Notifications You must be signed in to change notification settings

singlestore-labs/key-value-store-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Key-Value Store with SingleStore Demo

Attention: The code in this repository is intended for experimental use only and is not fully tested, documented, or supported by SingleStore. Visit the SingleStore Forums to ask questions about this repository.

Whether you're using an ORM or straight SQL, you can get started with SingleStore (formerly MemSQL) fast. Here's an introductory sample of using SingleStore with Node and JavaScript. This sample includes all the CRUD methods: Create, Read by id, Read all, Update, and Delete.

This is the demo code to accompany this blog post: How to Use SingleStore and Node.

Prerequisites

  • Node.js (version 14 or later)
  • Before you begin, you will need a FREE SingleStore account. You can learn more about creating an SingleStore account in the SingleStore Getting Started documentation.

Getting Started

1. Clone example repository

git clone git@github.com:singlestore-labs/key-value-store-demo.git
cd key-value-store-demo

2. Install Dependencies

npm install

3. Update DB Config

In index.js be sure to change the connection details at the top of the file to match the connection details from your SingleStore Database

// index.js

// TODO: adjust these connection details to match your SingleStore deployment:
const HOST = 'PASTE YOUR SINGLESTORE ADMIN ENDPOINT HERE';
const USER = 'admin';
const PASSWORD = 'PASTE YOUR PASSWORD HERE';
const DATABASE = "app";

4. Run the development server

npm start

Learn More

To learn more about SingleStore, take a look at the following resources:

Contributing TLDR;

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Maintainers


Joe Karlsson

License

About

Whether you're using an ORM or straight SQL, you can get started with SingleStore (formerly MemSQL) fast. Here's an introductory sample of using SingleStore with Node and JavaScript. This sample includes all the CRUD methods: Create, Read by id, Read all, Update, and Delete.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published