- Install NodeJS latest
- Create your index on Algolia dashboard: Index Management
- Create API keys for on Algolia dashboard with the name restaurants_demo: API Key Management -- One API Key with ACL editSettings for index settings using the API -- One API Key with ACL addObject for loading data in your index using the API
- Install npm dependencies
npm install
- Configure the module
Create the file .env
at the root of the project, with this content
Important: Please change values for APPLICATION_ID, API_KEY_SETTINGS & API_KEY_LOAD_DATA
APPLICATION_ID, =
YOUR APPLICATION ID
API_KEY_SETTINGS =
YOUR API KEY FOR INDEX SETTINGS
API_KEY_LOAD_DATA =
YOUR API KEY FOR LOADING DATA
RESTAURANTS_INDEX = restaurants_demo
RESTAURANTS_JSON_FILE = ./dataset/restaurants_list.json
RESTAURANTS_CSV_FILE = ./dataset/restaurants_info.csv
- Process the data
- Initialize the index settings by issuing the command
node index.js init
- Initialize the JSON file by issuing the command
node index.js json
- Initialize the CSV file by issuing the command
node index.js csv