31Refer to [Twitter's search operators](https://socialdata.gitbook.io/docs/twitter-tweets/retrieve-search-results-by-keyword#endpoint-parameters) to fine-tune your query.
32
33### 4. Test API call
34Set `isProd = false` in the code if you are testing, to ensure there are enough tweets to display. <br>
35Toggle it back to `true` when you're ready to run this cron job in production and actuall send notifications.
60
61### NOTE: Usage Limits
62This val uses the SocialData API for Twitter data:
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.
81
821. **Create a Slack App**:
83 - Go to [Slack API Apps](https://api.slack.com/apps) → Create New App → From scratch
84 - Name your app and select your workspace
85 - Click "Create App"
20createTables().catch(console.error);
21
22// API routes
23app.route("/api", postRoutes);
24
25// Serve static files
37 async function fetchPosts() {
38 try {
39 const response = await fetch('/api/posts');
40 if (!response.ok) {
41 throw new Error('Failed to fetch posts');
86
87 try {
88 const response = await fetch(`/api/posts/${slug}`);
89 if (response.status === 404) {
90 navigate('/not-found');
9 <script src="https://esm.sh/highlight.js@11.9.0" crossorigin></script>
10 <link rel="stylesheet" href="https://esm.sh/highlight.js@11.9.0/styles/github.css">
11 <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+Pro:wght@300;400;600&display=swap">
12 <script src="https://esm.town/v/std/catch"></script>
13 <style>
31
32/**
33 * API response for posts list
34 */
35export interface PostsResponse {
39
40/**
41 * API response for a single post
42 */
43export interface PostResponse {
46
47/**
48 * API response for tags list
49 */
50export interface TagsResponse {
8- Markdown support for blog posts
9- SQLite database for content storage
10- API endpoints for managing blog content
11- Beautiful typography and reading experience
12
413 // Update todo status
414 try {
415 const response = await fetch('/api/todos/' + todoId, {
416 method: 'PUT',
417 headers: {
671 try {
672 // Submit log data
673 const response = await fetch('/api/log', {
674 method: 'POST',
675 headers: {
84 status: "pending",
85 priority: 3,
86 notes: "Consider a micro-SaaS or API that demonstrates your skills"
87 }
88 ];
22
23// Mount controllers
24app.route('/api/log', logEntryController);
25app.route('/api/todos', todoController);
26app.route('/api/leads', leadController);
27app.route('/', dashboardController);
28